XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

22  Debugging and Error Handling


  1. trace - add a function to the trace list
  2. untrace - remove a function from the trace list
  3. error - signal a non-correctable error
  4. cerror - signal a correctable error
  5. break - enter a break loop
  6. clean-up - clean-up after an error
  7. top-level - clean-up after an error and return to the top level
  8. continue - continue from a correctable error
  9. errset - trap errors
  10. baktrace - print n levels of trace back information
  11. evalhook - evaluate with hooks

(trace sym) - add a function to the trace list
sym - the function to add [quoted]
returns - the trace list

(untrace sym) - remove a function from the trace list
sym - the function to remove [quoted]
returns - the trace list

(error emsg [arg]) - signal a non-correctable error
emsg - the error message string
arg - the argument expression [printed after the message]
returns - never returns

(cerror cmsg emsg [arg]) - signal a correctable error
cmsg - the continue message string
emsg - the error message string
arg - the argument expression [printed after the message]
returns - nil when continued from the break loop

(break [bmsg [arg]]) - enter a break loop
bmsg - the break message string [defaults to **BREAK**]
arg - the argument expression [printed after the message]
returns - NIL when continued from the break loop

(clean-up) - clean-up after an error
returns - never returns

(top-level) - clean-up after an error and return to the top level
returns - never returns

(continue) - continue from a correctable error
returns - never returns

(errset expr [pflag]) - trap errors
expr - the expression to execute
pflag - flag to control printing of the error message
returns - the value of the last expression consed with NIL or NIL on error

(baktrace [n]) - print n levels of trace back information
n - the number of levels [defaults to all levels]
returns - NIL

(evalhook expr ehook ahook [env]) - evaluate with hooks
expr - the expression to evaluate
ehook - the value for *evalhook*
ahook - the value for *applyhook*
env - the environment [default is NIL]
returns - the result of evaluating the expression

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next