Wanted: Make the condition reporter for TYPE-ERROR mention the TYPE-OF the datum

Bug #777346 reported by Jean-Philippe Paradis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

Currently, the condition reporter for TYPE-ERROR is not as helpful as it could be:

(funcall '(lambda (a b) (+ a b)) 1 2) ; Silly confused-newbie example...

TYPE-ERROR =>
"The value (LAMBDA (A B) (+ A B)) is not of type (OR FUNCTION SYMBOL)."

I'd suggest instead something like this:

TYPE-ERROR =>
"The value (LAMBDA (A B) (+ A B)) is not of type (OR FUNCTION SYMBOL).
(It is of type CONS.)"

The TYPE-OF the datum is of course only a rough indication, but I hope this example illustrates that it can sometimes give a helpful hint as to what the problem might be.

Changed in sbcl:
status: New → Triaged
importance: Undecided → Low
tags: added: easy feature
Revision history for this message
Krzysztof Drewniak (krzysdrewniak) wrote :

Patch attach. Feel free to incorporate it once code freeze ends. If I did something wrong, please let me know.

tags: added: patch
Andrew (andrew.dudash)
tags: added: review
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.