improved error messge for register
svn: r14628
This commit is contained in:
parent
955f99fe41
commit
450bafcde4
|
@ -32,8 +32,12 @@
|
|||
extra
|
||||
[_ (err tag p)])))]))
|
||||
|
||||
(define (err spec p)
|
||||
(raise-syntax-error #f "illegal specification" #`(#,spec . #,p) p))
|
||||
(define (err spec p . extra-spec)
|
||||
(raise-syntax-error (cadr spec)
|
||||
(if (null? extra-spec)
|
||||
"illegal specification"
|
||||
(string-append "illegal specification: " (car extra-spec)))
|
||||
#`(#,spec . #,p) p))
|
||||
|
||||
;; Symbol (Symbol X -> X) -> (X -> X)
|
||||
(define (check-flat-spec tag coerce>)
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
(lambda (p)
|
||||
(syntax-case p ()
|
||||
[(host) #`(ip> #,tag host)]
|
||||
[_ (err tag p)])))]
|
||||
[_ (err tag p "expected a host (ip address)")])))]
|
||||
[name (lambda (tag)
|
||||
(lambda (p)
|
||||
(syntax-case p ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user