Skip to content

Commit 2e8d39b

Browse files
motiz88facebook-github-bot
authored andcommitted
ExceptionsManager: Handle null filenames in symbolicated stack trace gracefully
Summary: If some stack frames in a trace fail to symbolicate (or are genuinely unmapped), their `frame` field will be null, and `ExceptionsManager.js` will currently crash. This diff lets it recover gracefully and show whatever information is available. Reviewed By: dcaspi Differential Revision: D15296220 fbshipit-source-id: 2b1006b1354295171b25bfc6230c5b3e0c57f67f
1 parent a05e9f8 commit 2e8d39b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Libraries/Core/ExceptionsManager.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ function reportException(e: ExtendedError, isFatal: boolean) {
4646
.then(prettyStack => {
4747
if (prettyStack) {
4848
const stackWithoutInternalCallsites = prettyStack.filter(
49-
frame => frame.file.match(INTERNAL_CALLSITES_REGEX) === null,
49+
frame =>
50+
frame.file &&
51+
frame.file.match(INTERNAL_CALLSITES_REGEX) === null,
5052
);
5153
ExceptionsManager.updateExceptionMessage(
5254
message,

0 commit comments

Comments
 (0)