cs: initialize error-value->string-handler per place

Closes #2377
This commit is contained in:
Matthew Flatt 2018-11-17 15:15:23 -07:00
parent f6eb956199
commit 64069a5792
2 changed files with 9 additions and 1 deletions

View File

@ -51,7 +51,7 @@
;; Install the default error-value->string handler,
;; replacing the non-working primitive placeholder
(void
(define (install-error-value->string-handler!)
(error-value->string-handler
(lambda (v len)
(unless (exact-nonnegative-integer? len)
@ -61,3 +61,8 @@
(define o (open-output-string))
(do-global-print 'default-error-value->string-handler v o 0 len)
(get-output-string o))))
(void (install-error-value->string-handler!))
(module+ place-init
(provide install-error-value->string-handler!))

View File

@ -26,6 +26,8 @@
"path/system.rkt"
(only-in "host/rktio.rkt"
rktio-place-init!)
(submod "error/main.rkt"
place-init)
"port/place.rkt")
(provide (all-from-out "port/main.rkt")
@ -57,6 +59,7 @@
(sandman-place-init!)
(rktio-place-init!)
(logger-init!)
(install-error-value->string-handler!)
(init-current-directory!)
(init-current-ports! in-fd out-fd err-fd cust plumber))