use of finally block in exception handling in webmethods
Answer / wmlead
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)
| Is This Answer Correct ? | 16 Yes | 1 No |
the document is published but not subscribed where the document stored and how to trace the document?
1 Answers Cap Gemini, Tech Mahindra,
In which case the transformers should not be used...?
what is the difference between Schema and SchemaDT
can we invoke morethan one service in trigger?
In which case we are not advised to use Transformers...?
What Is a Flow Step?
What is a scope of a variable that declared inside the main? Is tht accessible in try & catch block?
What Is a Flow Service?
how to configure sap adapter 4.1
Join types in Trigger?Explain?
How many ways can you invoke a service?
In ftp, if we need to change username and password. what we have to do?