fix bug in error checking code
This commit is contained in:
parent
569af52ffc
commit
ba89a5da92
|
@ -42,12 +42,14 @@
|
|||
(define-struct rectangle (left top right bottom style color) #:inspector #f)
|
||||
|
||||
(define (build-rectangle left top right bottom style color)
|
||||
(unless (or (symbol? right) (symbol? left))
|
||||
(when (right . < . left)
|
||||
(error 'build-rectangle "found right to the right of left: ~s"
|
||||
(list left top right bottom style color)))
|
||||
(list left top right bottom style color))))
|
||||
(unless (or (symbol? top) (symbol? bottom))
|
||||
(when (bottom . < . top)
|
||||
(error 'build-rectangle "found bottom above top: ~s"
|
||||
(list left top right bottom style color)))
|
||||
(list left top right bottom style color))))
|
||||
(make-rectangle left top right bottom style color))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user