fix error reporting in `reencode-output-port'
Closes PR 12077
This commit is contained in:
parent
eba9c56d8c
commit
61f628f2c6
|
@ -1469,7 +1469,7 @@
|
|||
[convert-newlines-to #f]
|
||||
[decode-error (lambda (msg port)
|
||||
(error 'reencode-input-port
|
||||
(format "~a: ~e" msg)
|
||||
(format "~a: ~~e" msg)
|
||||
port))])
|
||||
(let ([c (bytes-open-converter "UTF-8" encoding)]
|
||||
[ready-bytes (make-bytes 1024)]
|
||||
|
|
|
@ -726,7 +726,12 @@
|
|||
(port->bytes (reencode-input-port (open-input-bytes #"\xFF\xFF") "utf-8"))
|
||||
(lambda (exn)
|
||||
(regexp-match? #rx"^reencode-input-port:" (exn-message exn))))
|
||||
|
||||
(err/rt-test
|
||||
(let ([o (reencode-output-port (open-output-bytes) "utf-8")])
|
||||
(display #"\xFF\xFF" o) (flush-output o))
|
||||
(lambda (exn)
|
||||
(regexp-match? #rx"^reencode-output-port:" (exn-message exn))))
|
||||
|
||||
;; --------------------------------------------------
|
||||
|
||||
(let-values ([(in out) (make-pipe)])
|
||||
|
|
Loading…
Reference in New Issue
Block a user