From: Olof-Joachim Frahm Date: Thu, 25 Apr 2013 23:36:50 +0000 (+0200) Subject: Print type of value when reporting a TYPE-ERROR. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=52ce83228dc5ffa9bc5fa33b06b568d16eece770;p=sbcl.git Print type of value when reporting a TYPE-ERROR. --- 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*