This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nested exception

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I dont understand that why there is a nested exception in the programming.

i.e.



Why this is done in the code.
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There will be cases where.. Applications will have there own specific exceptions defined.

In that case.. they catch the predefined exception, create their own exception and throw it back.
 
Campbell Ritchie
Sheriff
Posts: 48635
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

In most cases where you throw a new Exception, you can pass the old Exception to its constructor and both Exceptions can be passed together.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic