Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

uncaughtException method : problem

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
please could anybody elaborate on the uncaught exception method??
 
A timing clock, fuse wire, high explosives and a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!