mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Preserve error types during translation
By preserving the exception type, more fine-grained error handling can be performed via client-side logic (e.g. redirect to a search page if a PDF is not found, or to a ticket system in case of invalid PDF files). The original exception is now re-thrown. Fixes #11658
This commit is contained in:
parent
a13db5d91a
commit
f5fd24a61f
1 changed files with 1 additions and 1 deletions
|
@ -817,7 +817,7 @@ const PDFViewerApplication = {
|
|||
|
||||
return loadingErrorMessage.then(msg => {
|
||||
this.error(msg, { message });
|
||||
throw new Error(msg);
|
||||
throw exception;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue