Skip to content

Commit

Permalink
CLJ-1735 - Add docstring for Throwable->map
Browse files Browse the repository at this point in the history
Signed-off-by: Stuart Halloway <stu@cognitect.com>
  • Loading branch information
puredanger authored and stuarthalloway committed Jun 17, 2015
1 parent bdc752a commit e72d043
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/clj/clojure/core_print.clj
Expand Up @@ -413,7 +413,10 @@
(defmethod print-method StackTraceElement [^StackTraceElement o ^Writer w]
(print-method [(symbol (.getClassName o)) (symbol (.getMethodName o)) (.getFileName o) (.getLineNumber o)] w))

(defn Throwable->map [^Throwable o]
(defn Throwable->map
"Constructs a data representation for a Throwable."
{:added "1.7"}
[^Throwable o]
(let [base (fn [^Throwable t]
(let [m {:type (class t)
:message (.getLocalizedMessage t)
Expand Down

0 comments on commit e72d043

Please sign in to comment.