STREAM-ERROR-POSITION-INFO fails on non-string and closed streams

Bug #1264902 reported by Jan Moringen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

What I did:
(handler-case
    (with-input-from-string (stream "no-such-package::symbol")
      (read stream))
  (reader-error (condition) (princ-to-string condition)))

What happens:
PRINC-TO-STRING signals an error because STREAM is closed and STREAM-ERROR-POSITION-INFO does not expect that.

What I expected to happen:
PRINC-TO-STRING should produce a string representation of CONDITION (not including position information) without signaling an error.

Tags: reader streams
Revision history for this message
Jan Moringen (scymtym) wrote :
Revision history for this message
Jan Moringen (scymtym) wrote :

Updated patch: STREAM-ELEMENT-TYPE can signal an error for closed streams.

Jan Moringen (scymtym)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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