Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 7 The Exception Statements : ON Statement

ON Statement
The ON statement begins an exception handler. It includes the exception name and is coded in the exception handler portion of the rule. It can be followed by a sequence of actions that are executed if the exception is detected.
Usage of ON
The ON statement consists of:
1.
2.
3.
4.
Usage Notes
Action sequence numbers are not permitted within an ON statement or its following action statements.
Examples
1.
ON GETFAIL MANAGER:
   CALL ENTER_MANAGER;
2.
ON DEFINITIONFAIL:
   CALL ENDMSG ('The report does not exist.');
About the Examples
Example 1 traps the exception GETFAIL on the MANAGER table. If a GETFAIL occurs on the MANAGER table, the ENTER_MANAGER rule is called. If a GETFAIL occurs on another table, an error message is issued.
Example 2 traps the exception DEFINITIONFAIL. If a DEFINITIONFAIL occurs, the shareable tool ENDMSG is called and a message is returned to the screen.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved