Show TOC

Function documentationException Handling for Actions Locate this document in the navigation structure

 

You can use this function to throw exceptions in one of the following ways:

  • Through a user exception using the Throw action

  • When an action fails (because of an exception or the value of its returned success indicator is false) and the ThrowOnActionError transaction attribute is true

    For more information about transaction attributes, see Properties for Transactions.

Features

When a transaction is in an exception state, the system skips all actions until it reaches a Catch action or the transaction finishes. If the transaction is terminated, the status is Failed and an error message is returned.

Control branches are skipped; the control directs the exception down the noncontrol branches. If the exception occurs within a control branch, the branch continues execution until it moves back to the control. The control then redirects execution to the noncontrol branches.

Activities

If you want your transaction to process an action failure as an exception, you must set the ThrowOnActionError transaction attribute to true.

Example

If an exception is active and the next control is a loop, the execution does not execute the loop branch; it passes to the post-loop branches.