Skip to content

Commit

Permalink
fix: Add try/catch of occasional crash when parsing json
Browse files Browse the repository at this point in the history
Fixes #241
  • Loading branch information
HazAT committed Sep 26, 2017
1 parent 5941ef5 commit 59a1c45
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/NativeClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class NativeClient {
this._activateStacktraceMerging();
const eventEmitter = new NativeEventEmitter(RNSentryEventEmitter);
eventEmitter.addListener(RNSentryEventEmitter.MODULE_TABLE, moduleTable => {
this._updateIgnoredModules(JSON.parse(moduleTable.payload));
try {
this._updateIgnoredModules(JSON.parse(moduleTable.payload));
} catch (e) {
console.log(e);
}
});
}
RNSentry.setLogLevel(options.logLevel);
Expand Down

0 comments on commit 59a1c45

Please sign in to comment.