File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 12
12
* pathStrip: A RegExp that matches the portions of a file URI that should be
13
13
* removed from stacks prior to submission.
14
14
*
15
- * noRethrow: Pass true if you DO NOT wish for Raven to call the original
16
- * global exception handler (e.g. don't crash the app).
15
+ * rethrow: Pass true if you wish for Raven to call the original global
16
+ * exception handler (e.g. don't crash the app or show the redbox).
17
+ * Default behavior is to rethrow in dev (for redbox), and NOT to rethrow
18
+ * (keeping the app alive after a JS exception).
17
19
*/
18
20
'use strict' ;
19
21
@@ -85,9 +87,10 @@ function reactNativePlugin(Raven, pluginOptions) {
85
87
86
88
var defaultHandler = ErrorUtils . getGlobalHandler && ErrorUtils . getGlobalHandler ( ) || ErrorUtils . _globalHandler ;
87
89
90
+ var rethrow = pluginOptions . rethrow || __DEV__ ;
88
91
ErrorUtils . setGlobalHandler ( function ( ) {
89
92
var error = arguments [ 0 ] ;
90
- if ( ! pluginOptions . noRethrow ) {
93
+ if ( rethrow ) {
91
94
defaultHandler . apply ( this , arguments )
92
95
}
93
96
Raven . captureException ( error ) ;
You can’t perform that action at this time.
0 commit comments