next up previous contents index
Next: Linking external files to Up: Overview Previous: Subroutines and diversions

Handling errors that arise during processing of a subroutine

The program can take two courses of action when an error occurs during a subroutine. Firstly, it can obey a set of commands that you specify in the case of error; and secondly it can take default action. The first case is described below: the ONERROR:  command is used to set other than default action. The second case, the default action, is described here.

If an error occurs during a macro, and if no action has been specified via the ONERROR:  command, the macro is aborted. If the error occurred during the initial execution of a log-in macro, the entire program is terminated. Otherwise, control returns to the screen.

A channel number need not be suplied with a label. If no channel number is given, the current channel number is assumed. If the named label does not exist on the current channel, a search is made until a matching file is found on another input channel, if any. These other channels are searched in numerical order.



David Wooff
Wed Oct 21 15:14:31 BST 1998