• Post Reply Bookmark Topic Watch Topic
  • New Topic

run() method and exceptions

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly. Take a look at the uncaughtException(Thread, Throwable) method of ThreadGroup.
 
Peter Haggar
author
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at my article in the August 1998 issue of Java Report titled "Multithreaded Exception Handling in Java".
Peter Haggar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!