Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel eScript Language Reference > Statements Reference > Guidelines for Using Siebel eScript > Try StatementThe Try statement processes an exception. It handles functions that can raise an exception, which is an error condition that causes the script to branch to another routine. It can include the following clauses:
You can write code that does the following to trap errors that a statement block creates:
Formattry Table 25 describes the arguments for the Try statement.
ExampleThe following example demonstrates the format of a Try statement that includes a catch clause. In this example, Siebel eScript continues to run the script after it displays the error message: try Example Usage of the Finally ClauseThe finally clause includes code that Siebel eScript must run before it exits the Try statement, regardless of if a catch clause stops running the script. You can write code that uses one of the following statements to exit a finally clause: CAUTION: A Return statement in the finally clause suppresses any exceptions that Siebel eScript creates in the method or that it passes to the method. It skips statements in the finally clause only if the finally clause redirects flow to another part of the script. The following example includes a finally clause. Siebel eScript continues running this code after the no_way statement. It ignores the Return statement: |
![]() ![]() |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |