Returns the exception thrown during an asynchronous action of the
agent if the agent is failed. Returns nil if the agent is not
failed.
(def tdate (agent (java.util.Date.))) @tdate => #<Date Wed Feb 15 23:25:26 CET 2012> (send tdate inc) ;;this has no meaning, rendering a (silent) error (agent-error tdate) => #<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>
Sets the error-handler of agent a to handler-fn. If an action bein
(defn agent-error
"Returns the exception thrown during an asynchronous action of the
agent if the agent is failed. Returns nil if the agent is not
failed."
{:added "1.2"}
[^clojure.lang.Agent a] (.getError a))
Comments top
No comments for agent-error. Log in to add a comment.