File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nested exception

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • 0
  • 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
  • 0
  • 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
Pie
Posts: 47293
52
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic