[ReactNative] console.error shows RedBox with pretty stack trace

This commit is contained in:
Spencer Ahrens committed 2015-04-22 15:51:41 -08:00
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();