I am working on an Android app where for uncaught exceptions I do this Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()...);
This way when an uncaught exception is thrown I log it and send a request to my issue tracker to create a new issue. I would like to do the same for errors. Is there a way to intercept uncaught errors in Java or Android? I have combed through stackoverflow and Google and have not found anything.
After comments on the functionality of this and the fact that I was not able to find any info regarding this, and not being able to find and info related to this, I did some testing and it does in fact get called when an error is thrown as well. The name is misleading but it does in fact work with errors as well. Thanks to the comments for the guidance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With