Version 24.1.8906


Version 24.1.8906

The arc:catch keyword is used to create an exception-handling block in a script. In addition to arc:try, you can contain an arc:catch block within any of the following keywords, the scope of which serves as an implicit arc:try section:


  • code: The code parameter allows you to selectively catch exceptions. To catch all exceptions, use the character *.

Control Attributes

  • _code: The code of the caught exception.
  • _description: A short description of the caught exception.
  • _details: More information about the exception, if available.


Wrap a more user-friendly message around the error output from a batch file or shell command:

<arc:call op="sysExecute">
  <arc:check attr="sys:error">
    <arc:throw code="myerror" description="Batch file could not be executed" details="[sys:error]"/>
<arc:catch code="*">
  <arc:call op="appSendEmail"/>

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

<arc:call op="...">
  <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]"/>

Catch all exceptions:

<arc:catch code="*">
  An exception occurred. Code: [_code], Message: [_description]

See Also