@honeybadger-io/react-native
Advanced tools
Comparing version 0.0.6 to 0.0.7
17
index.js
@@ -17,4 +17,6 @@ // | ||
let _logLevel = "warning"; // "error", "warning", "debug" | ||
let _previousJSGlobalExceptionHandler = null; | ||
// ---------------------------------------------------------------------------- | ||
@@ -157,9 +159,22 @@ // Public Interface | ||
function setJavaScriptErrorHandler() { | ||
function setJavaScriptErrorHandler() | ||
{ | ||
logDebug("Setting up the JavaScript global error handler."); | ||
_previousJSGlobalExceptionHandler = global.ErrorUtils.getGlobalHandler(); | ||
global.ErrorUtils.setGlobalHandler(function(err, isFatal) { | ||
logDebug("JavaScript global error handler triggered."); | ||
onJavaScriptError(err, { | ||
initialHandler: 'Global JavaScript Error Handler', | ||
}); | ||
// Allowing the default error handler to process the error after | ||
// we're done with it will show the useful RN red info box in dev. | ||
if ( _previousJSGlobalExceptionHandler && _previousJSGlobalExceptionHandler != this ) { | ||
logDebug("Passing error to previous error handler."); | ||
_previousJSGlobalExceptionHandler(err, isFatal); | ||
} | ||
}); | ||
@@ -166,0 +181,0 @@ } |
{ | ||
"name": "@honeybadger-io/react-native", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Honeybadger.io for React Native.", | ||
@@ -5,0 +5,0 @@ "author": "Andrey Butov <andreybutov@antair.com> (https://andreybutov.com)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1145206
13588