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 "Problem in" file-path)
(println "---------------------") (println "---------------------")
(println "Assertion failed!") (println "Assertion failed!")
(println (.replaceFirst (.getMessage (.getCause e)) (let [actual-error (or (.getCause e) e)
"^Assert failed: " message (or (.getMessage actual-error)
"")) (.toString actual-error))]
(println (.replaceFirst message "^Assert failed: " "")))
false))) false)))
(defn namaste [] (defn namaste []