mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 19:48:30 +08:00
Capture StackOverflowExceptions triggered when drawing a ReactViewGroup or ReactRootView
Reviewed By: achen1 Differential Revision: D6653395 fbshipit-source-id: 849b1a2ed6ab9bc057414d451e97a673178c30dd
This commit is contained in:
committed by
Facebook Github Bot
parent
877f1cde2e
commit
1aac962378
@@ -304,13 +304,13 @@ public class ReactContext extends ContextWrapper {
|
||||
* {@link com.facebook.react.bridge.NativeModuleCallExceptionHandler} if one exists, rethrowing
|
||||
* otherwise.
|
||||
*/
|
||||
public void handleException(RuntimeException e) {
|
||||
public void handleException(Exception e) {
|
||||
if (mCatalystInstance != null &&
|
||||
!mCatalystInstance.isDestroyed() &&
|
||||
mNativeModuleCallExceptionHandler != null) {
|
||||
mNativeModuleCallExceptionHandler.handleException(e);
|
||||
} else {
|
||||
throw e;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user