Siebel eScript Language Reference > Siebel eScript Language Overview > eScript Statements >

throw Statement


The throw statement is used to make sure that script execution is halted when an error occurs.

Syntax

throw exception

Parameter
Description
exception
An object in a named error class

Returns

Not applicable

Usage

Throw can be used to make sure that a script stops executing when an error is encountered, regardless of what other measures may be taken to handle the error. In the following code, the throw statement is used to stop the script after the error message is displayed.

try
{
   do_something;
}
catch( e )
{
   TheApplication().Trace (e.toString()));

throw e;
}

See Also

try Statement and CORBACreateObject() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003