Macro: CSWITCH

Documentation

Like SWITCH but signals a continuable error if no clause matches.

Source

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