store/[org.clojure/clojure "1.8.0"] clj::clojure.core/agent-error

Official Documentation

Add notes
Arities
==================================================
   [a]

Docstring
==================================================
  Returns the exception thrown during an asynchronous action of the
  agent if the agent is failed.  Returns nil if the agent is not
  failed.

Source

(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"
   :static true}
  [^clojure.lang.Agent a] (.getError a))

Example 1

Edit
(def tdate (agent (java.util.Date.)))

@tdate
;; => #<Date Wed Feb 15 23:25:26 CET 2012>

;; this has no meaning, rendering a (silent) error
(send tdate inc)

(agent-error tdate)
;; => #<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>

Uses on crossclj