diff --git a/collects/racket/place.rkt b/collects/racket/place.rkt index 595bde5cd2..1d57e3cb0c 100644 --- a/collects/racket/place.rkt +++ b/collects/racket/place.rkt @@ -87,7 +87,7 @@ (apply make-prefab-struct key (map dcw (cdr (vector->list (struct->vector o)))))] - [else (error "Error not place serializable ~a" o)])) + [else (raise-mismatch-error 'place-channel-send "cannot transmit a message containing " o)])) (dcw x)) diff --git a/collects/tests/racket/place-channel.rktl b/collects/tests/racket/place-channel.rktl index 33a802a80f..473b33cfcd 100644 --- a/collects/tests/racket/place-channel.rktl +++ b/collects/tests/racket/place-channel.rktl @@ -1,6 +1,7 @@ (load-relative "loadtest.rktl") (Section 'place-channel) -(require racket/flonum) +(require racket/flonum + rackunit) (define (splat txt fn) (call-with-output-file fn #:exists 'replace @@ -103,5 +104,10 @@ END (place-channel-send pl pc5) (test "Ready5" sync pc6) + (check-exn exn:fail? (λ () (place-channel-send pl (open-output-string)))) + (check-not-exn (λ () (place-channel-send pl "Test String"))) + (check-not-exn (λ () (place-channel-send pl (string->path "C:\\Windows")))) + (place-wait pl) ) +