---
sourceDocument: Yokohama Data and Automation
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/integrate-applications

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Data and Automation

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Use the Try Catch component

# Use the Try Catch component {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Catch an error or exception that occurs in a component in an automation.

## Before you begin

Role required: none

## About this task

To configure the properties for the Try Catch component, see [Properties of the Try Catch component](https://www.servicenow.com/docs/ABr1fBaN3PhxcBKpXkcsAg#Properties-general-components__Try-Catch-component).

For details on the issues related to the Try Catch
component, see [KB article KB1123551](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1123551), [KB article KB1123552](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1123552), and [KB article KB1123556](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1123556).

You can use multiple instances of the Try Catch component in an automation to handle errors from other components along the same execution path. When the Try Catch component catches an error or
exception in a component, the automation after the failed component doesn't execute. The Try Catch component returns the error message and can optionally execute an alternative flow which is connected to its On Error port. If an
activity comprising a Try Catch component calls another activity with no Try Catch component along the same execution path and after its Try Catch component, the Try Catch component can catch errors, if any, in the called
activity.

## Procedure

1. In the Toolbox pane, navigate to GeneralTry Catch.
2. Drag the Try Catch component to the Design surface.
3. Connect the ports of the Try Catch component to the corresponding ports of the other components or activities as described in the following table.  
   {#use-general-try-catch__table_gtq_gq1_ntb__entry__6}

   | Port type | Port name | Data type | Purpose of connection | Default value | Mandatory? |
   |-|-|-|-|-|-|
   | Control Out | Control-Out | Not applicable | When there us no error, passes the control to another component or an Activity. | Not applicable | Yes |
   | Control Out | On Error | Not applicable | Passes the control to another component or activity after the Try Catch component catches an error. Use this port after the Try Catch component catches an error or exception and you want to execute another component in the current or another activity. | Not applicable | No. Connecting the port is optional. |
   | Data Out | Error Message | String | Returns the error message. | Not applicable | No. Connecting the port is optional. |
   [Table 1. Try Catch component port parameters]

   {#use-general-try-catch__table_gtq_gq1_ntb}
4. **Optional:** To test the component, right-click the component bar and then select Run From Here.  
   Note:  
   The Try Catch component may not work as expected with the Parallel component.

## The TRY CATCH component catches the error from the ReadFromExcel method {#use-general-try-catch__example_uk4_2th_stb}

The Try Catch component catches the error from the ReadFromExcel method. The On Error port then passes the control to the Show component.

*[\>]: and then


