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

throw Statement


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

Syntax

throw exception

Parameter
Description

exception

An object in a named error class

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

CORBACreateObject() Method
try Statement

Siebel eScript Language Reference