mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
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:
parent
27a80f3b88
commit
ed5fc43510
5 changed files with 45 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue