wanted: better type errors reporting in PRINT
Bug #586940 reported by
Roman Marynchak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Low
|
Roman Marynchak | ||
Bug Description
A simple issue, discovered by accident. SBCL 1.0.38
Try entering (print 1 2) in REPL. The next error raises:
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING
There is no applicable method for the generic function
#<STANDARD-
when called with arguments
(2).
It will be better to signal the error in PRINT and to claim that the second argument is not a valid output stream. Both CLISP and Lispworks go this way.
The same issue exists for similar functions, for example PRINC.
Regards,
Roman
Changed in sbcl: | |
status: | New → In Progress |
assignee: | nobody → Roman Marynchak (roman-marynchak) |
tags: | added: review |
Changed in sbcl: | |
assignee: | Roman Marynchak (roman-marynchak) → Nikodemus Siivola (nikodemus) |
Changed in sbcl: | |
assignee: | Nikodemus Siivola (nikodemus) → nobody |
status: | In Progress → Triaged |
Changed in sbcl: | |
assignee: | nobody → Roman Marynchak (roman-marynchak) |
Changed in sbcl: | |
importance: | Undecided → Low |
To post a comment you must log in.
The patch, as per discussion on sbcl-devel.
Now (print 1 2) yields:
(print 1 2)
debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
{A9F5941} >:
The value 2 is not of type STREAM.
PRINC, PPRINT and PRIN1 now give the same error as the above when given non-output-stream second argument.
Regards,
Roman