Created
August 7, 2012 00:15
-
-
Save ninjudd/3279837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defmacro with-error-header | |
| "Execute the code in body, printing the given error message if something goes wrong." | |
| [message & body] | |
| `(try ~@body | |
| (catch Throwable e | |
| (binding [*out* *err*] | |
| (println message)) | |
| (throw e)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment