--- title: "try" description: "This expression is used to swallow errors caused by other expressions." --- # try > This expression is used to swallow errors caused by other expressions. **This function is used by Ignition's Expression language.** ## Description This expression is used to suppress errors caused by other expressions. The first expression will be evaluated, and if it executes successfully, its value will be used. However, if an error occurs while evaluating the expression, the value of the failover parameter will be used. When the failover is returned, its data quality will be applied. ## Syntax `try(expression, failover)` ### Parameters | Type | Parameter | Description | |--------|-------------------|-----------------------------------------------------------------------------| | Object | `expression` | An expression that can evaluate to any supported data type. | | Object | `failover` | The value to return if an error occurs while evaluating **expression**. | ### Returns **Object** - The result of the evaluated expression, or the failover value if an error occurs. ## Examples ```python title="Code Snippet" try(toInteger("boom"), -1) // returns -1 with a quality code of 192 (good) ``` ```python title="Code Snippet" // fetch an integer value from the first row of a table. Return -1 if there are no rows try({Root Container.Power Table.data}[0, 'Integer Column'], -1) ```