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:
Andreas Erhard 2020-04-22 13:35:45 +02:00
parent a13db5d91a
commit f5fd24a61f

View File

@ -817,7 +817,7 @@ const PDFViewerApplication = {
return loadingErrorMessage.then(msg => {
this.error(msg, { message });
throw new Error(msg);
throw exception;
});
}
);