• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception Handling  RSS feed

 
Manu Sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to call my own method after the try block of "try{} catch {} block ". Is it possible to do so? Means not going to catch block the flow should go to my own defined method.

Manish
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is fine:

Or do you mean something else?
 
Manu Sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
what i mean is after try block my method should get call, not the catch block.
what u have shown is the same? is it?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what u have shown is the same? is it?

Yes. Assuming nothing in the try block throws an Exception, in which case the code in the catch block will be called before myMethod().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!