Is there a way to make a global exception-handler in Java. I want to use like this:
"When an exception is thrown somewhere in the WHOLE program, exit."
The handler may not catch exceptions thrown in a try-catch body.
try-catch
Martijn
Use Thread.setDefaultUncaughtExceptionHandler. See Rod Hilton's "Global Exception Handling" blog post for an example.
1.4m articles
1.4m replys
5 comments
56.9k users