Steel Bank Common Lisp

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

Reported by Jean-Philippe Paradis on 2011-05-04
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers