forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate logbox into earlyjs c++ pipeline (facebook#46935)
Summary: Pull Request resolved: facebook#46935 Now, whenever the earlyjs c++ pipeline handles an error, it'll invoke callbacks registered via javascript. ## The API ``` if (global.RN$registerExceptionListener != null) { global.RN$registerExceptionListener( (error: ExtendedExceptionData & {preventDefault: () => mixed}) => { error.preventDefault(); // show logbox }, ); } ``` ## The Future API We want something more aligned with the HTML spec: ``` addEventListener('error', (event) => { event.preventDefault(); // show logbox }); ``` ## Fatals vs soft errors The earlyjs pipeline covers just main bundle execution for now. So, it displays logbox only if there was a soft error. If there was a fatal error, it'll just continue to display redbox as usual. Changelog: [Internal] Reviewed By: javache Differential Revision: D63769385
- Loading branch information
1 parent
a119496
commit b630055
Showing
6 changed files
with
173 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters