• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

uncaughtException method : problem

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i can't understand the mechanics of it. Here's what i have found:
//starts here
public void uncaughtException(Thread t,Throwable e)
Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception.
The uncaughtException method of ThreadGroup does the following:
If this thread group has a parent thread group, the uncaughtException method of that parent is called with the same two arguments.
Otherwise, this method determines if the Throwable argument is an instance of ThreadDeath. If so, nothing special is done.
Otherwise, the Throwable's printStackTrace method is called to print a stack backtrace to the standard error stream.
//ends here
what is "ThreadDeath"?
could anyone explain me how this method works?
thanx
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The genealogy of ThreadDeath is as follows:
Throwable implements java.io.Serializable
Error extends Throwable
ThreadDeath extends Error
Hope this helps
Rgds
Sahir
http://www.geocities.com/sahirshah/


 
Anshuman Acharya
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please could anybody elaborate on the uncaught exception method??
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic