allow nil for clog-obj on with-clog-debugger

This commit is contained in:
David Botton 2024-05-29 22:01:19 -04:00
parent 977364eff2
commit b5c5e52bd4

View file

@ -228,8 +228,11 @@
standard-output standard-output
standard-input) standard-input)
&body body) &body body)
"body uses a clog-gui based debugger instead of the console" "body uses a clog-gui based debugger instead of the console, if clog-obj is
nil uses *clog-debug-instance*"
`(with-open-stream (out-stream (make-instance 'dialog-out-stream)) `(with-open-stream (out-stream (make-instance 'dialog-out-stream))
(unless clog-body
(setf clog-body *clog-debug-instance*))
(with-open-stream (in-stream (make-instance 'dialog-in-stream :clog-obj ,clog-obj :source out-stream)) (with-open-stream (in-stream (make-instance 'dialog-in-stream :clog-obj ,clog-obj :source out-stream))
(labels ((my-debugger (condition encapsulation) (labels ((my-debugger (condition encapsulation)
(handler-case (handler-case