mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[ReactNative] console.error shows RedBox with pretty stack trace
This commit is contained in:
1 parent
c5ea25f7fb
commit
e63bfae8f6
5 files changed
+39
-29
No files matched your search
@@ -77,6 +77,7 @@ function handleErrorWithRedBox(e) {
|
||||
function setupRedBoxErrorHandler() {
|
||||
var ErrorUtils = require('ErrorUtils');
|
||||
ErrorUtils.setGlobalHandler(handleErrorWithRedBox);
|
||||
GLOBAL.reportException = require('ExceptionsManager').reportException;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,8 +135,8 @@ function setupGeolocation() {
|
||||
}
|
||||
|
||||
setupDocumentShim();
|
||||
setupRedBoxErrorHandler();
|
||||
setupTimers();
|
||||
setupRedBoxErrorHandler(); // needs to happen after setupTimers
|
||||
setupAlert();
|
||||
setupPromise();
|
||||
setupXHR();
|
||||
|
||||
Reference in new issue
Block a user