INCLAN: erract: Difference between revisions

From CYANA Wiki
Jump to navigation Jump to search
m (1 revision)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Synopsis ==


"erract" is a variable for error handling in macros. If an error occurs
'''erract'''
within a macro, the value of erract is executed as a command. By default
the exit command is executed, i.e. the program returns to interactive
input. Errors that occur interactively are displayed and the program
continues with the execution of the next statement.


Example: set erract="show; quit"
== Description ==
        In case of an error in a macro a listing of all global variables
 
        is given, and the program is stopped. Such error handling can be
A variable for error handling in macros. If an error occurs within a macro, the value of '''erract''' is executed as a command. By default the [[INCLAN: exit|'''exit''']] command is executed, i.e. the program returns to interactive input. Errors that occur interactively are displayed and the program continues with the execution of the next statement, regardless of the setting of of the erract variable. If, for instance,
        useful if the program is used non-interactively.
 
== Example ==
 
erract := "show; quit"
 
Then in case of an error in a macro a listing of all global variables is given, and the program is stopped. Such error handling can be useful if the program is used non-interactively.

Latest revision as of 15:36, 17 August 2009

Synopsis

erract

Description

A variable for error handling in macros. If an error occurs within a macro, the value of erract is executed as a command. By default the exit command is executed, i.e. the program returns to interactive input. Errors that occur interactively are displayed and the program continues with the execution of the next statement, regardless of the setting of of the erract variable. If, for instance,

Example

erract := "show; quit"

Then in case of an error in a macro a listing of all global variables is given, and the program is stopped. Such error handling can be useful if the program is used non-interactively.