[react_native] JS files from D2115306: implement ExceptionsManager.report(Fatal|Soft)Exception

This commit is contained in:
Andrei Coman 2015-06-02 07:28:56 -07:00
parent c094a156d6
commit 9b455c8677
1 changed files with 3 additions and 10 deletions

View File

@ -30,17 +30,10 @@ function reportException(e: Exception, isFatal: bool, stack?: any) {
if (!stack) {
stack = parseErrorStack(e);
}
if (!RCTExceptionsManager.reportFatalException ||
!RCTExceptionsManager.reportSoftException) {
// Backwards compatibility - no differentiation
// TODO(#7049989): deprecate reportUnhandledException on Android
RCTExceptionsManager.reportUnhandledException(e.message, stack);
if (isFatal) {
RCTExceptionsManager.reportFatalException(e.message, stack);
} else {
if (isFatal) {
RCTExceptionsManager.reportFatalException(e.message, stack);
} else {
RCTExceptionsManager.reportSoftException(e.message, stack);
}
RCTExceptionsManager.reportSoftException(e.message, stack);
}
if (__DEV__) {
(sourceMapPromise = sourceMapPromise || loadSourceMap())