Last active
December 10, 2015 21:58
-
-
Save MichaelDrogalis/4498503 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
(defn divider [a b] | |
(/ a b)) | |
(with-handler! #'divider | |
java.lang.ArithmeticException | |
(fn [e a b] "Dividing by 0!")) | |
(divider 10 2) ; => 5 | |
(divider 10 0) ; => Dividing by 0! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment