mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-08 09:12:05 +08:00
show script eval errors in redbox
Differential Revision: D2624801 fb-gh-sync-id: 48741a8caf029415753a4c616a07f18d3660e6fb
This commit is contained in:
committed by
facebook-github-bot-4
parent
e6372719ea
commit
9647c5a257
@@ -134,7 +134,11 @@ public class CatalystInstance {
|
||||
|
||||
incrementPendingJSCalls();
|
||||
|
||||
mJSBundleLoader.loadScript(mBridge);
|
||||
try {
|
||||
mJSBundleLoader.loadScript(mBridge);
|
||||
} catch (JSExecutionException e) {
|
||||
mNativeModuleCallExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
initLatch.countDown();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
/**
|
||||
* Exception thrown when there is an error evaluating JS, e.g. a syntax error.
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class JSExecutionException extends RuntimeException {
|
||||
|
||||
@DoNotStrip
|
||||
public JSExecutionException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user