Add |UnexpectedResponseException| to fix the exception handling when file loading fails because the server responds with a non 404 status message

This commit is contained in:
Jonas Jenwald 2014-09-13 16:47:16 +02:00
parent 27a80f3b88
commit ed5fc43510
5 changed files with 45 additions and 24 deletions

View file

@ -384,6 +384,21 @@ var MissingPDFException = (function MissingPDFExceptionClosure() {
})();
PDFJS.MissingPDFException = MissingPDFException;
var UnexpectedResponseException =
(function UnexpectedResponseExceptionClosure() {
function UnexpectedResponseException(msg, status) {
this.name = 'UnexpectedResponseException';
this.message = msg;
this.status = status;
}
UnexpectedResponseException.prototype = new Error();
UnexpectedResponseException.constructor = UnexpectedResponseException;
return UnexpectedResponseException;
})();
PDFJS.UnexpectedResponseException = UnexpectedResponseException;
var NotImplementedException = (function NotImplementedExceptionClosure() {
function NotImplementedException(msg) {
this.message = msg;