Skip to content

Commit

Permalink
feat: log errors from PDF.js package (related to #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Jun 25, 2024
1 parent e255e8b commit 867382f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export async function resolvePDFJSImports(
}

return;
} catch {
} catch (error) {
console.error(error);
throw new Error(
"Resolving failed. Please check the provided configuration.",
);
Expand All @@ -71,7 +72,8 @@ export async function resolvePDFJSImports(
const { resolvePDFJS } = await import("unpdf/pdfjs");
// @ts-ignore: Type mismatch
resolvedModule = await resolvePDFJS();
} catch {
} catch (error) {
console.error(error);
throw new Error(
"PDF.js is not available. Please add the package as a dependency.",
);
Expand Down

0 comments on commit 867382f

Please # to comment.