> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:try

> Use arc:try with arc:catch to create an exception-handling block in a script, catching RSBExceptions thrown within the try body.

export const siteNameShort = "Arc";

Use the `arc:try` and [arc:catch](./op-arc-catch) keywords to create an exception-handling block in a script. If any keyword inside the `arc:try` body throws an RSBException, the application looks for a matching `arc:catch` keyword inside the same scope and executes the catch body.

## Parameters

None

## Control Attributes

None

## Example

Throw and catch an exception. Inside the scope of the keyword, `arc:ecode` and `arc:emessage` attributes are added to the current item and pushed out.

```xml theme={null}
<arc:call op="...">
  <arc:try>
    <arc:throw code="myerror" description="thedescription" details="Other Details."/>
    <arc:catch code="myerror">
      <arc:set attr="arc:ecode" value="[_code]"/>
      <arc:set attr="arc:emessage" value="[_description]: [_details]"/>
      <arc:push/>
    </arc:catch>
  </arc:try>
</arc:call>
```

## See Also

* [arc:catch](./op-arc-catch): Process thrown exceptions.
* [arc:throw](./op-arc-throw): Force an exception.
