[hunchentoot-devel] Invoke-debugger

Peter Seibel peter at gigamonkeys.com
Fri Nov 13 23:02:12 UTC 2009


On Fri, Nov 13, 2009 at 11:49 AM, Edi Weitz <edi at agharta.de> wrote:
> On Fri, Nov 13, 2009 at 7:08 PM, Leslie P. Polzer
> <sky at viridian-project.de> wrote:
>
>> Not every signal is an error
>
> *break-on-signals* doesn't force you to break on every signal.

But it does force you, unless I'm deeply misunderstanding something,
to break on every signal matching the type spec your specify,
regardless of whether the error would have been handled by some higher
level handler.

E.g.

CL-USER> (define-condition my-condition () ())
MY-CONDITION
CL-USER> (defun foo () (signal 'my-condition))
FOO
CL-USER> (foo)
NIL
CL-USER> (defun bar ()
	   (handler-case (foo)
	     (my-condition () (format t "Handling my condition."))))
BAR
CL-USER> (bar)
Handling my condition.
NIL
CL-USER> (setq *break-on-signals* 'my-condition)
MY-CONDITION
CL-USER> (bar) ===> goes to debugger
; Evaluation aborted.
CL-USER>

-Peter

-- 
Peter Seibel
http://www.codersatwork.com/
http://www.gigamonkeys.com/blog/




More information about the Tbnl-devel mailing list