[CLJ-1209] clojure.test does not print ex-info in error reports Created: 11/May/13 Updated: 05/Sep/14
|Attachments:||0002-CLJ-1209-show-ex-data-in-clojure-test.patch clj-test-print-ex-data.diff output-with-0002-patch.txt|
clojure.test does not print the data attached to ExceptionInfo in error reports.
Approach: In clojure.stacktrace, which clojure.test uses for printing exceptions, add a check for ex-data and pr it.
|Comment by Alex Miller [ 20/Dec/13 9:53 AM ]|
Great idea, thx for the patch!
|Comment by Alex Miller [ 20/Dec/13 9:54 AM ]|
Would be great to see a before and after example of the output.
|Comment by Ivan Kozik [ 12/Jul/14 10:35 PM ]|
Attaching sample output
|Comment by Stuart Sierra [ 05/Sep/14 3:24 PM ]|
As pointed out on IRC, there's a possible risk of trying to print an infinite lazy sequence that happened to be included in ex-data.
To mitigate, consider binding *print-length* and *print-level* to small numbers around the call to pr.