java - Handle unexpected exceptions that silently kill a thread -


i've thread dies silently , want surround operation try/catch block find out going on without killing thread.

i surrounded operations within run try / catch (exception e) block concern may overlook checked exception getting thrown dependency of run() , not handled properly. on other hand, i'm worried (unchecked) errors getting swallowed well.

someone suggested short-term defense, should rename current run() method runinternal(), no checked exceptions declared, , put catch/log throwable in run() around call runinternal().

i don't understand how help.

i want surround operation try/catch block find out going on without killing thread.

quick answer: can't save thread. once exception thrown, can outsider stack trace.

the wrapping runinternal technique log stack trace of error, instead of having thread die silently.

however, want here, attach debugger, eclipse, , set pause on caught , uncaught exception until find 1 you're looking for. pause thread @ point of fault, without killing yet.

break when exception thrown


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -