Error Handling

   

 

Errors can be handled at three levels: individual actions, groups of actions, or project level.

 

Individual actions

 

Set the "Ignore Failure" flag on an action, and follow it with a "If Prev Action Failed" action to handle an anticipated error in a single action.

Each action can also retry if it fails, for more information on this see Timing Properties.

 

Groups of actions

 

For localized error handling, use the Try, Catch, Finally and End actions in the Flow Control category. The valid combinations are Try-Catch-End, Try-Finally-End or Try-Catch-Finally-End. To use these actions you must place the actions you want to run as child actions of the try, catch or finally.

 

Localised error handling works as follows:

 

  1. Child actions of the TRY are executed

  2. If any child action of the TRY fails, then execution skips to the Catch or Finally section

  3. If the CATCH section exists, and an action in the TRY section failed, then any child actions are executed

  4. If the FINALLY section exists, then child actions are always executed.

  5. The END action signifies the end of the exception handling block

 

 

Project level error handling

 

Every project contains an OnFailure action list which is executed if any action in the Main action list fails and it isn't handled by a Try-Catch block.

 

By default, if an action fails it will abort running the Main action list, and run any actions in the OnFailure action list. If you want to ignore an error for a particular action and continue processing, then set the Ignore Error property of the action.