Don't trap break exns in ->string/safe.

This commit is contained in:
Tony Garnock-Jones 2012-03-08 14:52:56 -05:00
parent faeb19a27e
commit bdc4cff0f4
1 changed files with 1 additions and 1 deletions

View File

@ -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))))))