[JS] JS API for global handling of unhandled exceptions
See original GitHub issueThe API I envision is similar to window.onerror but not necessarily the same. This would allow us to make RCTExceptionsManager.reportUnhandledException a lot smaller (we’d move much of the code into JS to keep the current behavior) and make it easier to do custom error handling.
Issue Analytics
- State:
- Created 8 years ago
- Comments:31 (23 by maintainers)
Top Results From Across the Web
How to resolve unhandled exceptions in Node.js
There are two approaches to resolve unhandled exceptions in Node.js that are discussed below: Approach 1: Using try-catch block: We know ...
Read more >Best Practices for Node.js Error-handling
This article will introduce you to error-handling in Node.js and ... I am going to mention dealing with unhandled promise rejections and exceptions....
Read more >Global Error Handling in ASP.NET Core Web API
The exception handling features help us deal with the unforeseen errors which could appear in our code. To handle exceptions we can use...
Read more >Client-side global error handling and unhandled promise ...
When a resource (such as an img or script ) fails to load, an error event using interface Event is fired at the...
Read more >How to Handle Exceptions in JavaScript
While this is relatively simplistic in terms of error handling, it is important to note that the exception that is caught is always...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Exactly @qbig
Basically
Then your
BridgeReloaderwould be an objC module that simply calls[_bridge reload]Or in an Android module, you just get the running activity, finish it, and restart it
Here: https://github.com/facebook/react-native/blob/d33b554f5d4bb7856cf2fc21175bab23d8225fe4/packager/react-packager/src/Resolver/polyfills/error-guard.js
‘setGlobalHandler’ would overwrite a lot of the RN behaviour (eg. RedBox in development). Understanding that we could just monkey patch globalHandler, the "" seems alarming. So maybe an API like addGlobalHandler, so that we could add custom handler without breaking the default behaviour and and without messing with “internal” variables ? @ide @satya164