My first thought for an agent error handler was to send the exception to
another agent.

user=> (let [handler (agent nil)
            a (agent 42
                     :error-handler
                     (fn [_ ex] (send handler
                                      (fn [_] (println ex)))))]
          (send a (fn [_] (throw (Exception. "bad news"))))
          (await a)
          @a)
42
;; No println!
user=>

Is this the way it should work? I saw some stuff about it in the wiki [1],
but it's hard to tell what was decided explicitly.

Shawn

[1] http://www.assembla.com/wiki/show/clojure/Agent_exception_handlers

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to