From: Russ Tyndall Date: Tue, 30 Oct 2012 19:46:35 +0000 (-0400) Subject: make use-debugger actually allow the debugger to get called with the X-Git-Tag: 0.9.4~2^2~3 X-Git-Url: https://repo.or.cz/w/lisp-unit.git/commitdiff_plain/17fed8d974907ad66ef8bbbf6c8037cf5f19db3e make use-debugger actually allow the debugger to get called with the original stack (use handler-bind instead of case) --- diff --git a/lisp-unit.lisp b/lisp-unit.lisp index 4f6528c..f30d769 100644 --- a/lisp-unit.lisp +++ b/lisp-unit.lisp @@ -536,14 +536,15 @@ assertion.") (defun run-test-thunk (code) (let ((*pass* 0) (*fail* 0)) - (handler-case (run-code code) - (error (condition) - (when *print-errors* - (print-error condition)) - (if (use-debugger-p condition) - condition - (return-from run-test-thunk - (values *pass* *fail* :error))))) + (handler-bind + ((error (lambda (condition) + (when *print-errors* + (print-error condition)) + (if (use-debugger-p condition) + condition + (return-from run-test-thunk + (values *pass* *fail* :error condition)))))) + (run-code code)) ;; Return the result count (values *pass* *fail* nil)))