NET/MASTER Network Control Language (NCL) Programmer's Guide

Scope and Error Handling
Run-Time Error Handling
106160 Tandem Computers Incorporated 7–19
Figure 7-1. Search Order for an Error Handler
PROC1: PROCEDURE 6
FUNC1: FUNCTION
PROC2: PROCEDURE
5
4
PROC3: PROCEDURE 3
PROC4: PROCEDURE
PROC5: PROCEDURE
Error raised here
2
1
003
ON ERROR ...
Scope and Recovering
From an Error
An error may be raised in one NCL procedure or function, even though the error
handler that handles the error may be located in a different NCL procedure or
function. Figure 7-1 illustrates a case in which the error and error handler are in
different NCL procedures: PROC5 and PROC1, respectively.
If this occurs, the error handler executes in the context of the NCL procedure in which
it is located. It inherits many of the characteristics of the NCL procedure or function in
which the error handler is found. These characteristics may be different from the
characteristics of the NCL procedure or function in which the error was raised.