Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Nikhil Das Nomula
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic