Repository navigation
[react-native] capture and report fatals on next launch - #626
Conversation
|
This would be handy as a transport in other environments too (think no internet situations) |
| * @return {Raven} | ||
| */ | ||
| addShouldSendCallback: function(callback) { | ||
| var prevCallback = this._globalOptions.shouldSendCallback; |
There was a problem hiding this comment.
Sigh, again hesitant to add more API methods – even though I know this solves some serious problems.
We've talked about just merging shouldSendCallback / dataCallback in a major version change (4.0).
There was a problem hiding this comment.
I'm writing a small plugin to solve #279. This API method would be useful.
|
I also bumped into this issue. Thank you for PR! |
|
Ping @nevir, it would be awesome if you could update the PR. Thanks! |
|
Ack, sorry! Will get to this in the new few days |
|
Alright, rebased it off of the latest! PTAL |
|
Ping @benvinegar |
|
Here goes nothing! |
|
Sweet! |
|
@nevir
|
|
@abc123s Indeed, I'm actually having that exact error atm. |
Addresses #468, #533, and maybe #489
When a fatal (global) error is thrown, raven-js now captures it and persists it before calling the original error handler when in production mode (e.g. so the JS error can bubble out and crash the app). Then, when the react native plugin initializes, it checks for a persisted error, and reports it.
Some finer details:
Raven.addShouldSendCallbackso that the react-native plugin doesn't bash over existing configurationsonInitializeis useful for detecting if an error was previously reported (say, if you want to pop a "we're sorry" alert, or fix up your store)This change is