arc:try

Version 22.0.8473


arc:try

Version 22.0.8473


The arc:try and arc:catch keywords are used to create an exception-handling block in a script. If any keyword inside the arc:try body throws an RSBException, the application will look for a matching arc:catch keyword inside the same scope and will execute 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.

<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