Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Statements Reference > Guidelines for Using Siebel eScript > Throw StatementThe Throw statement causes Siebel eScript to stop running code if an error occurs. FormatTable 24 describes arguments for the Throw statement. UsageIn the following example, the Throw statement stops the script after Siebel CRM displays an error message: try Using the Throw Statement with Nested Try Catch BlocksIf any error occurs while processing a statement in a try block, then Siebel eScript creates an exception. An outer catch block can handle this exception. For example, assume a section of code includes three levels of try catch blocks:
The following code illustrates this example: try Avoiding an Exception Error That Is Not HandledYou can write code that uses the RaiseErrorText method or the RaiseError method instead of the Throw statement to avoid receiving an unhandled exception error in the text that the Get Buffer Data method returns. If the Siebel Run-Time Engine creates an error message, or if the Throw statement creates an error message, then Siebel CRM adds the following text to the error message: Siebel CRM does this to distinguish an error message that the RaiseErrorText method or that the RaiseError method creates from an error that the Siebel Run-Time Engine creates or that the Throw statement creates. For more information, see Get Buffer Data Method and Try Statement. |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |