cs & io: name for default error value conversion handler

This commit is contained in:
Matthew Flatt 2019-11-26 08:55:35 -07:00
parent e15a6f99d4
commit 98f0c16b8c

View File

@ -52,15 +52,17 @@
;; Install the default error-value->string handler, ;; Install the default error-value->string handler,
;; replacing the non-working primitive placeholder ;; replacing the non-working primitive placeholder
(define (install-error-value->string-handler!) (define (install-error-value->string-handler!)
(error-value->string-handler (error-value->string-handler
(lambda (v len) (let ([default-error-value->string-handler
(unless (exact-nonnegative-integer? len) (lambda (v len)
(raise-argument-error 'default-error-value->string-handler (unless (exact-nonnegative-integer? len)
"exact-nonnegative-integer?" (raise-argument-error 'default-error-value->string-handler
len)) "exact-nonnegative-integer?"
(define o (open-output-string)) len))
(do-global-print 'default-error-value->string-handler v o 0 len) (define o (open-output-string))
(get-output-string o)))) (do-global-print 'default-error-value->string-handler v o 0 len)
(get-output-string o))])
default-error-value->string-handler)))
(void (install-error-value->string-handler!)) (void (install-error-value->string-handler!))