From b0691073b7ae5584544a1360cdbfb8429b2bf650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Krafft?= Date: Wed, 30 May 2018 13:12:51 +0200 Subject: [PATCH] Overiding console._errorOriginal Overriding console._errorOriginal used in ExceptionsManager.handleException --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e917cc0..d62cf6d 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,8 @@ export const setJSExceptionHandler = (customHandler = noop, allowedInDevMode = f const allowed = allowedInDevMode ? true : !__DEV__; if (allowed) { global.ErrorUtils.setGlobalHandler(customHandler); - console.error = (message, error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught + console.error = (error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught + console._errorOriginal = (error) => global.ErrorUtils.reportError(error); // overiding console._errorOriginal that is used by ExceptionsManager.handleException } else { console.log('Skipping setJSExceptionHandler: Reason: In DEV mode and allowedInDevMode = false'); }