Tuesday October 29, 2024

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  <SACATCH>    
 
 
 
Return to Tag List
 
The CATCH tag allows a developer to recovery gracefully when an error condition is encountered. The catch tag is usually used in conjunction with THROW and TRY blocks.

Note: Catch types are: SCRIPT, PARSER, DATABASE, SECURITY, FILE, FTP, USER and ALL.

 
Attributes:
TYPE   error type to be caught

 
The following is an example of a CATCH statement;
 
<SATRY> <!--- TRY something --->
   <SAQUERY DATASOURCE="someDS">
      INSERT INTO table(col1,col2)
        VALUES( '#PARAM.value1#', '#PARAM.value2#' )
   </SAQUERY>

   <!-- Not necessary - illustration only --->
   <SATHROW MESSAGE="Everything was successful!!">
</SATRY>

<SACATCH TYPE="DATABASE">
   There was a database error!<BR>
</SACATCH>

<SACATCH TYPE="SECURITY">
   There was a security error!<BR>
</SACATCH>

<SACATCH TYPE="USER">
   <!--- Thrown message caught here (if no errors) --->
   <SAOUTPUT VALUE=ERROR.MESSAGE><BR>
</SACATCH>





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy