[racket-dev] contract error message in 'system'

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jul 19 11:01:14 EDT 2012

Someone ran across something like the below and shared it with me: 
	
> (system "x\0y")
 system: contract violation
   expected:
    (or/c (and/c string? (lambda (s) (not (memv #\nul (string->list s)))))
          (and/c bytes? (lambda (bs) (not (memv 0 (bytes->list bs))))))
   given: "x\u0000y"

I can read it and I know what it says. BUT, I think for a casual novice scripter who encounters this kind of message, it is difficult to scrutinize and understand, especially when an English phrase -- say "a string or byte-string without nul character" -- would have served just as well. 

Is it okay if I change this and push a fix in 'systems.rkt'? 

-- Matthias



Posted on the dev mailing list.