Like switch but signals an error if no clause succeds.
(defmacro eswitch ((obj &key (test #'eql)) &body body)
"Like switch but signals an error if no clause succeds."
(rebinding (obj test)
`(switch (,obj :test ,test)
,@body
(t
(error "Unmatched SWITCH. Testing against ~S with ~S."
,obj ,test)))))Source Context