Wanted: Make the condition reporter for TYPE-ERROR mention the TYPE-OF the datum
Bug #777346 reported by
Jean-Philippe Paradis
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 |
tags: | added: patch |
tags: | added: review |
To post a comment you must log in.
Patch attach. Feel free to incorporate it once code freeze ends. If I did something wrong, please let me know.