Thursday March 28, 2024

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


Get SteelArrow!     
  <SATHROW/>    
 
 
 
Return to Tag List
 
The THROW tag allows a developer to throw a specific error mesage, or to change the flow of a script. The throw tag is usually used in conjunction with TRY and CATCH blocks.

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

 
Attributes:
MESSAGEvariable, expression or literal string message to THROW

 
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