Skip to content

Commit 4b40c39

Browse files
Thomas Scholteskamilogorek
authored andcommitted
fix: Ignore async exceptions when reading source files fails (#1501)
This fixes a subtle bug where async exceptions thrown in `addPrePostContext()` where not caught by the try/catch block.
1 parent f120f1a commit 4b40c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node/src/parsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export async function parseStack(stack: stacktrace.StackFrame[]): Promise<StackF
140140
});
141141

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

0 commit comments

Comments
 (0)