Here is an implementation of the Emacs Lisp `condition-case', along with a small test harness: