From 7f157b0e38ee7fdb9ee201bd2b6ecaf4fbd9068e Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Tue, 25 Feb 2014 11:01:04 -0600 Subject: [PATCH] Improve the reporting of TYPE-ERRORs, closing #777346 The print method for a TYPE-ERROR now reports the type of the expression that caused the error, along with the expected type. --- NEWS | 1 + src/code/condition.lisp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0302c8d..64f13e0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ;;;; -*- coding: utf-8; fill-column: 78 -*- changes relative to sbcl-1.1.15: + * enhancement: improve the reporting of TYPE-ERRORs (lp#777346) * minor incompatible change: improve read/print consistency for pathnames on Win32, by using the circumflex character #\^ as the escape character. (lp#673625) diff --git a/src/code/condition.lisp b/src/code/condition.lisp index c791fc7..b43d146 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -621,8 +621,9 @@ (:report (lambda (condition stream) (format stream - "~@" + "~@" (type-error-datum condition) + (type-of (type-error-datum condition)) (type-error-expected-type condition))))) (def!method print-object ((condition type-error) stream) -- 1.8.3.2