10.5.3.  Determining Error Location

The stack function will show the current function calling stack, expressed as a list of functions that the interpreter is currently evaluating. To trace the execution path of parts of a program it is useful to print out the code as it is evaluated. The trace and notrace functions act as delimiters to areas when tracing should occur. The tracing information is delivered to standard output.

The following table of predefined global variables provides additional information useful for debugging:

Table 10.1. Global Variables in Gamma
Global VariableDescription
_error_stack_The stack at the time the last error occured.
_unwind_stack_The stack at the time that an error was discovered.
_last_error_A string containing the last error.