Global Exception Handlers in Java

Posted by Samuh on Stack Overflow See other posts from Stack Overflow or by Samuh
Published on 2010-05-12T03:22:30Z Indexed on 2010/05/12 4:14 UTC
Read the original article Hit count: 185

I am thinking of setting up a global, default Exception handler for my (Android) Mobile application(which uses Java syntax) using Thread.setDefaultUncaughtExceptionHandler(...) call. I am thinking of just displaying an Alert Dialog with appropriate message to the user.

Are there any gotchas, caveats and rules that one needs to follow when setting DefaultExceptionHandlers? Any best practices like making sure that the process is killed, full stack trace is written to logs etc. ?

Links to documentation, tutorials etc. that can throw some light on this are welcome.

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about exception-handling