3.2 Entering and exiting the Debugger

3.2.1 Entering the Debugger

You can enter the Debugger in the following ways:

For example, the following code invokes the Debugger if the functionadd-one is called with an argument that is not a number:

> (defun add-one (x)
    (unless (numberp x)
      (error "Argument must be a number."))
    (+ x 1))
ADD-ONE

> (add-one 'a) >>Error: Argument must be a number. ADD-ONE: Original code: (NAMED-LAMBDA ADD-ONE (X) (BLOCK ADD-ONE (UNLESS # #) (+ X 1))) Required arg 0 (X): A :A 0: Abort to Lisp Top Level ->


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker