Qus:    What are the steps used to deploy?
Jul 01, 2013 10:57 1 Answers Views: 1646 Ansari
Prev Next
Answers (1)
Ansari Jul 01, 2013 10:57


Use of finally block in exception handling in webmethods

Lets assume we have a code where we are using open ssh and in the try block we are doing a sftp login .

 So in case of success or error either step we would have to do a logout . So to avoid code duplication both in end of try and catch block we can have a finally block (exit on done). Do a logout in this sequence. 

 Also it can hold good when we do a manual connection to a DB and irrespective of success or failure we want  to close connection.

 Main(Exit on success)


|----Try(Exit on Failure)


|----Catch(Exit on Done)

Finally(Exit on Done)

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect