Skip to content

Commit

Permalink
Fix RNTester not showing Redbox when Metro is not connected (#41191)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
Lulu Wu authored and cortinico committed Oct 27, 2023
1 parent 506ea9e commit 6d21522
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ DefaultHardwareBackBtnHandler getDefaultBackButtonHandler() {
final String method = "handleHostException(message = \"" + e.getMessage() + "\")";
log(method);

if (DEV) {
mDevSupportManager.handleException(e);
}
destroy(method, e);
mReactHostDelegate.handleInstanceException(e);
}
Expand Down

0 comments on commit 6d21522

Please sign in to comment.