Fix auto-runner for exceptions without causes or messages, fixes #16

This commit is contained in:
Colin Jones 2011-09-23 14:55:06 -05:00
parent 9239c1d172
commit 652cc6d29c

View File

@ -47,9 +47,10 @@
(println "Problem in" file-path)
(println "---------------------")
(println "Assertion failed!")
(println (.replaceFirst (.getMessage (.getCause e))
"^Assert failed: "
""))
(let [actual-error (or (.getCause e) e)
message (or (.getMessage actual-error)
(.toString actual-error))]
(println (.replaceFirst message "^Assert failed: " "")))
false)))
(defn namaste []