Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add OnDiscardedError handler #1245

Closed
vtrifonov opened this issue Jan 8, 2019 · 0 comments
Closed

Add OnDiscardedError handler #1245

vtrifonov opened this issue Jan 8, 2019 · 0 comments
Assignees
Milestone

Comments

@vtrifonov
Copy link
Contributor

vtrifonov commented Jan 8, 2019

Is your feature request related to a problem? Please describe.
Currently we have 2 custom flags which can be used to avoid application crashes when JS exceptions are thrown discardUncaughtJsExceptions and suppressCallJSMethodExceptions. Unfortunately those type of exceptions cannot be collected through analytics, so it would be good if we can provide a way of handling such exceptions so that you could be able to get more details about where and how often they happen.

Describe the solution you'd like
Adding __onDiscardedError similar to __onUncaughtError handler which will receive those exceptions can be useful to process them, e.g.:

global.__onDiscardedError = function(error){
    console.log(error.message);
    console.log(error.stackTrace);
    console.log(error.nativeException);
    //report the exception in your analytics solution here
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants