Page tree
Skip to end of metadata
Go to start of metadata

The Try action, along with the Catch, Finally and End actions provide structured exception handling. They allow you to create localised error handling and resource protection, just as you do in programming languages such as C++, C#, Delphi etc.

For each Try action, there should be a matching End Action at the same level. The Try must also have either a Catch Action or a Finally Action as it's next sibling. The actions can be used in the combinations listed below.

Try ... Catch block

Try ... Finally block

A Finally Action will almost always execute it's child actions, the exception being if there is a structural error with the try or catch (ie. a missing end, or finally before catch etc).

Try ... Catch ... Finally block

A more complete example:

Retrying Try Actions

All actions have the option to retry multiple times before failing outright. Try action retries work differently to normal action retries. If you set a number of Retry Attempts on a Try action, the entire try block (ie all of the child actions) will be retried if one of the actions from that block fails.

The Catch (or Finally) section of the Try/Catch/Finally will not be run until all the retries have failed.

Retrying Try Actions may give unpredictable behaviour when used inside Known Problems for details.
  • No labels