Don't trap break exns in ->string/safe.
This commit is contained in:
parent
faeb19a27e
commit
bdc4cff0f4
|
@ -29,7 +29,7 @@
|
|||
(define (->string/safe bs)
|
||||
(cond
|
||||
((string? bs) bs)
|
||||
((bytes? bs) (with-handlers ((exn? (lambda (e) (bytes->string/latin-1 bs))))
|
||||
((bytes? bs) (with-handlers ((exn:fail? (lambda (e) (bytes->string/latin-1 bs))))
|
||||
(bytes->string/utf-8 bs)))
|
||||
(else (call-with-output-string (lambda (p) (write bs p))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue