--- title: "Try/Catch actor" slug: "core-try-catch-actor" updated: 2026-04-01T13:46:31Z published: 2026-04-01T13:46:31Z canonical: "docs.lobstersoftware.com/core-try-catch-actor" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Try/Catch actor > [!NOTE] > Event action – Abstract > > **Purpose:** Enables the interception and 'handling' of errors when executing event actions within an event handler. > > > [!TIP] > > Tooltip > > > > - **Usage:** Event actions for which errors are to be caught are placed in the 'Try' block. Event actions in the 'Catch' block are only executed if an error occurs in the 'Try' block at runtime. In the 'Catch' block, the *reference object* is an object of type 'Error information' with details about the error. > > - **Parameter:** Two blocks ('Try' and 'Catch') of event actions. > > - **Output:** Continuation of event handling despite an error in the 'Try' block and – if configured – execution of event actions in the 'Catch' block. > > - **NOTE:** If a [Abort](/v1/docs/en/core-abort-actor) is executed in the 'Catch' block or another error occurs, the event handling is aborted with a *rollback*. The [Try/Catch actor](/v1/docs/en/core-try-catch-actor) enables controlled responses to errors in the context of event handlers. Error handling can be especially helpful when Loster_data profiles are called (see [Call profile (Event action)](/v1/docs/en/core-call-profile-actor)). The configuration of the action separates the process into two 'branches': - The **Try** branch contains actions for which the error handling should apply. - The **Catch** branch contains actions to execute when an error occurs in the **Try** branch. **NOTE:** If the **Catch** branch contains no actions, event handling will continue below the Try/Catch actor in case of an error without any notice. ![images/download/attachments/177912161/image2019-4-5_13-36-28-version-1-modificationdate-1726643749625-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2019-4-5_13-36-28-version-1-modificationdate-1726643749625-api-v2.png) In the event of an error, an object of the 'Error information' type is available in the **Catch** branch, from whose properties further details about the error can be taken via an [Object property](/v1/docs/en/core-property-resolver) value resolver. Try/Catch actors can be nested to handle errors by levels. The [Abort](/v1/docs/en/core-abort-actor) can be used to pass control from a nested **Catch** branch to the **Catch** at the parent level. In general, an [Abort](/v1/docs/en/core-abort-actor) can be used to raise errors with specific properties. **NOTE:** The [Try/Catch actor](/v1/docs/en/core-try-catch-actor) does not catch all types of errors. In particular, database errors that would compromise the integrity of the transaction cannot be caught. Configuration examples: A [Search (Event action)](/v1/docs/en/core-search-actor) (not shown in the screenshot) provides tuple search results with aggregated information on certain shipments as a list in variable **shipments**. This list is processed in a [For each loop](/v1/docs/en/core-for-each-entity-actor) (on the left in the image), to issue notifications with the average value per package. If an error occurs within the loop in the **Try** branch, the **Catch** branch is processed and an error message is output. This terminates the loop. ![images/download/attachments/177912161/image-2024-9-18_9-21-16-version-1-modificationdate-1726644075477-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-18_9-21-16-version-1-modificationdate-1726644075477-api-v2.png) Since the calculation in the loop involves a division by the number of packages, the loop is aborted with an error – if there is a shipment with a value of 0 for the number of packages: ![images/download/attachments/177912161/image2019-4-5_13-57-59-version-1-modificationdate-1726643749630-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2019-4-5_13-57-59-version-1-modificationdate-1726643749630-api-v2.png) If the loop should continue with the next shipment after showing an error message instead of being terminated, the 'Try/Catch' actor must be used inside the loop: ![images/download/attachments/177912161/image-2024-9-18_9-50-26-version-1-modificationdate-1726645826029-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-18_9-50-26-version-1-modificationdate-1726645826029-api-v2.png) The following output illustrates that the loop is not terminated after the first error: ![images/download/attachments/177912161/image2019-4-5_14-4-47-version-1-modificationdate-1726643749634-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2019-4-5_14-4-47-version-1-modificationdate-1726643749634-api-v2.png)