[react_native] JS files from D2115306: implement ExceptionsManager.report(Fatal|Soft)Exception
This commit is contained in:
parent
c094a156d6
commit
9b455c8677
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue