From 52ce83228dc5ffa9bc5fa33b06b568d16eece770 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Fri, 26 Apr 2013 01:36:50 +0200 Subject: [PATCH] Print type of value when reporting a TYPE-ERROR. --- src/code/condition.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/code/condition.lisp b/src/code/condition.lisp index a1d40d5..29797bc 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -620,10 +620,12 @@ (expected-type :reader type-error-expected-type :initarg :expected-type)) (:report (lambda (condition stream) - (format stream - "~@" - (type-error-datum condition) - (type-error-expected-type condition))))) + (let ((datum (type-error-datum condition))) + (format stream + "~@" + datum + (type-error-expected-type condition) + (type-of datum)))))) (def!method print-object ((condition type-error) stream) (if (and *print-escape* -- 1.7.10.4