It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes uncaughtException ????? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "uncaughtException ?????" Watch "uncaughtException ?????" New topic
Author

uncaughtException ?????

Leandro Oliveira
Ranch Hand

Joined: Nov 07, 2002
Posts: 298
when an exception is thrown method uncaughtExceptin of the thread group that contains the current thread is called to every uncaught exception!!! so if I extends the class ThreadGroup and overrides uncaughtException method will I be able to avoid stoping the current thread
( i know its a bit useless but just for studing!!!) thanks!!!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12265
    
    1
I doubt that very much. When an exception has gotten that far, the Thread has left the run method. You can't recover and re-enter the run method, so all you can do is provide custom handling for the exception.
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: uncaughtException ?????
 
Similar Threads
uncaughtException method : problem
throw an exception from UncaughtExceptionHandler
rules roundup-ERROR
Daemon Threads
run() method and exceptions