aspose file tools*
The moose likes Java in General and the fly likes Catch an exception from a class which is calling a method that throws an exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Catch an exception from a class which is calling a method that throws an exception" Watch "Catch an exception from a class which is calling a method that throws an exception" New topic
Author

Catch an exception from a class which is calling a method that throws an exception

Nikhil Das Nomula
Greenhorn

Joined: Jun 10, 2011
Posts: 26
I am calling a method which throws a SQLException. Can I get access to this exception from the method in which I am calling? and can we return in a catch block?
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
Nikhil Das Nomula wrote:I am calling a method which throws a SQLException. Can I get access to this exception from the method in which I am calling? and can we return in a catch block?


I don't see why not. And you might not have to return out of it...

 
Consider Paul's rocket mass heater.
 
subject: Catch an exception from a class which is calling a method that throws an exception