Use Thread.setDefaultUncaughtExceptionHandler. See Rod Hilton’s “Global Exception Handling” blog post for an example.
More Related Contents:
- When to catch java.lang.Error?
- Why is the Catch(Exception) almost always a bad Idea?
- How do you implement a re-try-catch?
- Java unreported exception
- Differences between Runtime/Checked/Unchecked/Error/Exception
- Throws or try-catch
- What is a suppressed exception?
- Java uncaught global exception handler
- What are reasons for Exceptions not to be compatible with throws clauses?
- Guidelines on Exception propagation (in Java)
- Who is calling the Java Thread interrupt() method if I’m not?
- Why do Java people frequently consume exceptions silently?
- In Java how can I validate a thrown exception with JUnit?
- Why am I getting “must be caught or declared to be thrown” on my program?
- Why exception occurs in this program?
- How can I solve “java.lang.NoClassDefFoundError”?
- What are the effects of exceptions on performance in Java?
- How to generate exceptions from RepaintManager
- How to create custom exceptions in Java? [closed]
- Given final block not properly padded
- Null check chain vs catching NullPointerException
- When should we create our own Java exception classes? [closed]
- Using Joda Date & Time API to parse multiple formats
- Why are Exceptions not Checked in .NET?
- Java: Exceptions as control flow?
- In a Java 7 multicatch block what is the type of the caught exception?
- Android exception handling best practice?
- Should methods that throw RuntimeException indicate it in method signature?
- Unable to run JUnit test with PowerMockRunner
- maximum size of java class / exception table