(agent-error a)
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>