mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Ensure that PasswordException
is handled correctly in the wrapReason
function
While running the unit-tests with some logging statements added to this code, I noticed that `PasswordException` was missing from the list of potential Errors that could be passed to the `wrapReason` function.
This commit is contained in:
parent
153d058b3a
commit
9ea3fa0747
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
assert,
|
||||
createPromiseCapability,
|
||||
MissingPDFException,
|
||||
PasswordException,
|
||||
UnexpectedResponseException,
|
||||
UnknownErrorException,
|
||||
warn,
|
||||
|
@ -64,6 +65,8 @@ function wrapReason(reason) {
|
|||
return new AbortException(reason.message);
|
||||
case "MissingPDFException":
|
||||
return new MissingPDFException(reason.message);
|
||||
case "PasswordException":
|
||||
return new PasswordException(reason.message, reason.code);
|
||||
case "UnexpectedResponseException":
|
||||
return new UnexpectedResponseException(reason.message, reason.status);
|
||||
case "UnknownErrorException":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue