aspose file tools
The moose likes Java in General and the fly likes Exception Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Exception Handling" Watch "Exception Handling" New topic
Author

Exception Handling

Manu Sharma
Greenhorn

Joined: Apr 03, 2006
Posts: 2
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

Joined: Apr 14, 2004
Posts: 10336

This is fine:

Or do you mean something else?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Manu Sharma
Greenhorn

Joined: Apr 03, 2006
Posts: 2
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

Joined: Apr 14, 2004
Posts: 10336


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().
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception Handling
 
Similar Threads
Need for finally block?
Query regarding finally method
Exceptions
Catching exception not thrown in try clause
Rethrow an exception in Java ?