The moose likes Threads and Synchronization and the fly likes run() method and exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "run() method and exceptions" Watch "run() method and exceptions" New topic
Author

run() method and exceptions

Kev D'Arcy
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
Probably a stupid question, but can a run method in a thread throw RuntimeExceptions that can be caught in the parent thread?
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
Not directly. Take a look at the uncaughtException(Thread, Throwable) method of ThreadGroup.
Peter Haggar
author
Ranch Hand

Joined: Jan 03, 2001
Posts: 106
Take a look at my article in the August 1998 issue of Java Report titled "Multithreaded Exception Handling in Java".
Peter Haggar


Senior Software Engineer, IBM
author of: Practical Java
 
 
subject: run() method and exceptions
 
Threads others viewed
Related to thread
Thread Start() method
how to make simple sleep()
Using interupt to stop the Thread
Focus Lost problem
IntelliJ Java IDE