Skip to content

Instantly share code, notes, and snippets.

@takumikinjo
Created June 10, 2010 16:38
Show Gist options
  • Save takumikinjo/433268 to your computer and use it in GitHub Desktop.
Save takumikinjo/433268 to your computer and use it in GitHub Desktop.
(defmacro errhdlr (&rest body)
"do body in condition-case"
(declare (indent 0) (debug t))
(list 'condition-case 'err (cons 'progn body)
(list 'error
(list 'message "%s"
(list 'error-message-string 'err)))
(list 'file-error
(list 'message "%s"
(list 'error-message-string 'err)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment