mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Update Catalog.getAllPageDicts
to always propagate the actual Errors (PR 14335 follow-up)
Rather than "swallowing" the actual Errors, when data fetching fails, ensure that they're always being propagated as intended to the call-site instead. Note that we purposely handle `XRefEntryException` specially, to make it possible to fallback to indexing all XRef objects.
This commit is contained in:
parent
47f9eef584
commit
70ac6b1694
2 changed files with 21 additions and 9 deletions
|
@ -1393,7 +1393,9 @@ class PDFDocument {
|
|||
|
||||
let pagesTree;
|
||||
try {
|
||||
pagesTree = await pdfManager.ensureCatalog("getAllPageDicts");
|
||||
pagesTree = await pdfManager.ensureCatalog("getAllPageDicts", [
|
||||
recoveryMode,
|
||||
]);
|
||||
} catch (reasonAll) {
|
||||
if (reasonAll instanceof XRefEntryException && !recoveryMode) {
|
||||
throw new XRefParseException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue