[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) { if (!stack) {
stack = parseErrorStack(e); stack = parseErrorStack(e);
} }
if (!RCTExceptionsManager.reportFatalException || if (isFatal) {
!RCTExceptionsManager.reportSoftException) { RCTExceptionsManager.reportFatalException(e.message, stack);
// Backwards compatibility - no differentiation
// TODO(#7049989): deprecate reportUnhandledException on Android
RCTExceptionsManager.reportUnhandledException(e.message, stack);
} else { } else {
if (isFatal) { RCTExceptionsManager.reportSoftException(e.message, stack);
RCTExceptionsManager.reportFatalException(e.message, stack);
} else {
RCTExceptionsManager.reportSoftException(e.message, stack);
}
} }
if (__DEV__) { if (__DEV__) {
(sourceMapPromise = sourceMapPromise || loadSourceMap()) (sourceMapPromise = sourceMapPromise || loadSourceMap())