Skip to content

Instantly share code, notes, and snippets.

@earl-ducaine
Created December 19, 2017 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earl-ducaine/bce5e27248c806027b824e8162b381c3 to your computer and use it in GitHub Desktop.
Save earl-ducaine/bce5e27248c806027b824e8162b381c3 to your computer and use it in GitHub Desktop.
;; Dot notation (see how forms parameter is used in macro)
(defmacro with-my-error-handling-dot (context &body forms)
`(handler-bind
((error
(lambda (condition)
(my-error-handler ,context condition))))
,.forms))
;; At notation (see how forms parameter is used in macro)
(defmacro with-my-error-handling-at (context &body forms)
`(handler-bind
((error
(lambda (condition)
(my-error-handler ,context condition))))
,@forms))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment