> ## 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.

Use the `arc:try` and [arc:catch](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-catch.md) 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](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-catch.md): Process thrown exceptions.
* [arc:throw](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-throw.md): Force an exception.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.