:BEFORE and :AFTER methods
Before or after the “primary” method
Return value is ignored
(defmethod area :before ((object square))
(when (< (width object) 0)
(error "Width is negative.")))
Previous slide
Next slide
Back to first slide
View graphic version