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


Chapter 6 Exception Handling : Scope of Exception Handlers

Scope of Exception Handlers
Scope of An Exception Handler
An exception handler is in effect only during the execution of the actions of the rule in which it occurs. It traps exceptions generated both in the rule and in any of its descendant rules—rules that are below it in the calling hierarchy. If an exception is not trapped within the calling hierarchy, the transaction terminates with an error condition and the message log shows that the exception was signaled.
Scope of Multiple Exception Handlers
If an exception handler in two or more rules at different levels in the calling hierarchy can handle the same exception, the handler in the lowest rule at or above the point where the exception is raised handles the exception.
If more than one handler within a rule can handle an exception, the most specific handler is executed. For example:
If a rule has both a GETFAIL handler and an ACCESSFAIL handler and a GETFAIL exception occurs, the GETFAIL handler is invoked.
Limiting the Scope of Data Access Exceptions
You can limit the scope of data access exception handlers by specifying a table name. Data access exception handlers are:
If a table name is specified, the handler traps the corresponding exception only if it is detected while accessing that table. If no table is specified, the handler traps the exception regardless of which table is being accessed.

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