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
@ -817,7 +817,7 @@ const PDFViewerApplication = {
|
||||
|
||||
return loadingErrorMessage.then(msg => {
|
||||
this.error(msg, { message });
|
||||
throw new Error(msg);
|
||||
throw exception;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user