NET/MASTER Network Control Language (NCL) Reference Manual

REVERT
Core Statements
2–58 106126 Tandem Computers Incorporated
Example
In the following example, the REVERT statement releases the ON ERROR handler
established in the FUNCTION core statement:
PROC: PROCEDURE
/* Top level error handler for ERROR */
ON ERROR DO
SAY "We are in the top level error handler."
SAY "This is the correct handler to be invoked."
END
SAY FUNC()
FUNC: FUNCTION
/* Nested error handler for ERROR */
ON ERROR DO
SAY "We are in the nested error handler."
SAY "This should not be invoked"
END
REVERT ERROR
SIGNAL ERROR
END FUNC
END PROC
The ON ERROR statement in the preceding NCL procedure is reverted to and
becomes the current general error handler. If there were no general error handler, the
REVERT statement would behave as a NOP statement.