Skip to content

Commit

Permalink
fix: Ignore async exceptions when reading source files fails (#1501)
Browse files Browse the repository at this point in the history
This fixes a subtle bug where async exceptions thrown in `addPrePostContext()` where not caught by the try/catch block.
  • Loading branch information
Thomas Scholtes authored and kamilogorek committed Sep 3, 2018
1 parent f120f1a commit 4b40c39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/node/src/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function parseStack(stack: stacktrace.StackFrame[]): Promise<StackF
});

try {
return addPrePostContext(filesToRead, frames);
return await addPrePostContext(filesToRead, frames);
} catch (_) {
// This happens in electron for example where we are not able to read files from asar.
// So it's fine, we recover be just returning all frames without pre/post context.
Expand Down

0 comments on commit 4b40c39

Please sign in to comment.