Fix RNTester not showing Redbox when Metro is not connected (#41191)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41191

In dev mode, display a Redbox for the first fatal error during RN initialization. So if the first fatal error is Metro not connected that will be displayed via Redbox.

Changelog:
[Android][Changed] - Fix RNTester not showing Redbox when Metro is not connected

Reviewed By: cortinico

Differential Revision: D50600631

fbshipit-source-id: f269091c1745a76b49e72d9051c4836a39fded12
This commit is contained in:
Lulu Wu
2023-10-25 10:23:29 -07:00
committed by Facebook GitHub Bot
parent 1e21b5b08c
commit b67bc3ffd3
@@ -638,6 +638,9 @@ public class ReactHostImpl implements ReactHost {
final String method = "handleHostException(message = \"" + e.getMessage() + "\")";
log(method);
if (DEV) {
mDevSupportManager.handleException(e);
}
destroy(method, e);
mReactHostDelegate.handleInstanceException(e);
}