From 17fed8d974907ad66ef8bbbf6c8037cf5f19db3e Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Tue, 30 Oct 2012 15:46:35 -0400 Subject: [PATCH] make use-debugger actually allow the debugger to get called with the original stack (use handler-bind instead of case) --- lisp-unit.lisp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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))) -- 2.11.4.GIT