Skip to content

Commit 7c0b48d

Browse files
authored
Merge pull request #57 from skrafft/master
Overiding console._errorOriginal
2 parents 4e888a5 + b069107 commit 7c0b48d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export const setJSExceptionHandler = (customHandler = noop, allowedInDevMode = f
1414
const allowed = allowedInDevMode ? true : !__DEV__;
1515
if (allowed) {
1616
global.ErrorUtils.setGlobalHandler(customHandler);
17-
console.error = (message, error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught
17+
console.error = (error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught
18+
console._errorOriginal = (error) => global.ErrorUtils.reportError(error); // overiding console._errorOriginal that is used by ExceptionsManager.handleException
1819
} else {
1920
console.log('Skipping setJSExceptionHandler: Reason: In DEV mode and allowedInDevMode = false');
2021
}

0 commit comments

Comments
 (0)