Created
September 14, 2012 17:16
-
-
Save mhaemmerle/3723317 to your computer and use it in GitHub Desktop.
failed agent behaviour
This file contains 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
(def a (agent 1)) | |
(set-error-mode! a :fail) | |
(set-error-handler! a (fn [failed-agent exception] | |
(println "error-handler" failed-agent exception) | |
(restart-agent failed-agent @failed-agent) | |
(println "restart done"))) | |
(send a / 0) | |
(await a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment