Skip to content

Commit

Permalink
ExceptionsManager: Handle null filenames in symbolicated stack trace …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
motiz88 authored and facebook-github-bot committed May 14, 2019
1 parent a05e9f8 commit 2e8d39b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Core/ExceptionsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function reportException(e: ExtendedError, isFatal: boolean) {
.then(prettyStack => {
if (prettyStack) {
const stackWithoutInternalCallsites = prettyStack.filter(
frame => frame.file.match(INTERNAL_CALLSITES_REGEX) === null,
frame =>
frame.file &&
frame.file.match(INTERNAL_CALLSITES_REGEX) === null,
);
ExceptionsManager.updateExceptionMessage(
message,
Expand Down

0 comments on commit 2e8d39b

Please sign in to comment.