TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-180
#FILTER Built-In Function
Only the most recent #FILTER in a routine has any effect. If a routine that contains
a filter list calls another routine that also contains a filter list, the list in the called
routine becomes active. When control is returned from that routine, the filter list in
the calling routine resumes active status. If a routine contains more than one
#FILTER function call, the latest list supersedes all previous lists.
When an exception occurs, if the current routine has no exception handler, TACL
automatically exits that routine and pops you out of routines until it finds a #FILTER
for that exception and reinvokes the routine containing the #FILTER. If TACL finds
no such routine, it performs its normal exception handling: it resets frames and
results and, if the exception is the predefined _ERROR exception, it displays an
error message.
To determine why an exception handler was invoked, use the #EXCEPTION built-
in function. To raise an exception, use the #RAISE built-in function.
Example
This example shows a #FILTER call that lists two exceptions:
#FILTER _ERROR userex
For examples showing the use of #FILTER with exception handlers, refer to the TACL
Programming Guide.