I hate this kind of error checking.

svn: r11696
This commit is contained in:
Stevie Strickland 2008-09-12 18:55:11 +00:00
parent 019c2c8c34
commit 19cfe4e49e

View File

@ -233,13 +233,20 @@ improve method arity mismatch contract violation error messages?
[(_ blame (arg ...) body0 body ...)
#'(with-contract #:type region blame (arg ...) body0 body ...)]
[(_ blame (arg ...))
(identifier? #'blame)
(raise-syntax-error 'with-contract
"empty body"
stx)]
[(_ blame bad-args etc ...)
(identifier? #'blame)
(raise-syntax-error 'with-contract
"expected list of identifier and/or (identifier contract)"
#'bad-args)]
[(_ args etc ...)
(not (identifier? #'args))
(raise-syntax-error 'with-contract
"expected identifier for blame"
#'args)]
[(_ blame)
(raise-syntax-error 'with-contract
"only blame"