(define-condition test-condition (error) ((test-slot :reader test-slot :initarg :test-slot))) (defun test-function () (restart-case (error 'test-condition :test-slot 1) (testable-restart () :report "Visible restart." :test (lambda (c) (format t ";; From restart test function: ~A~%" c) (and (typep c 'test-condition) (eql (test-slot c) 1))) nil))) * (test-function) ;; From restart test function: Condition COMMON-LISP-USER::TEST-CONDITION was signalled. debugger invoked on a TEST-CONDITION in thread #: Condition COMMON-LISP-USER::TEST-CONDITION was signalled. Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [TESTABLE-RESTART] Visible restart. 1: [ABORT ] Exit debugger, returning to top level. (TEST-FUNCTION) source: (RESTART-CASE (ERROR 'TEST-CONDITION :TEST-SLOT 1) (TESTABLE-RESTART NIL :REPORT "Visible restart." :TEST (LAMBDA (C) (FORMAT T ";; From restart test function: ~A~%" C) (AND (TYPEP C 'TEST-CONDITION) (EQL (TEST-SLOT C) 1))) ;; From restart test function: NIL NIL))