clojure.test does not print ex-info in error reports

Description

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.

After:

Patch: 0002-CLJ-1209-show-ex-data-in-clojure-test.patch

Screened by: Alex Miller

Environment

None

Attachments

4

Activity

Show:

Ed Bowler December 22, 2016 at 5:35 PM

Alex Miller May 14, 2015 at 2:35 PM

I don't think 1716 covers it at all as clojure.test/clojure.stacktrace don't use the new throwable printing. But they could! And that might be a better solution than the patch here.

For example, the existing patch does not consider what to do about nested exceptions, some of which might have ex-data. The new printer handles all that in a consistent way.

import May 13, 2015 at 8:39 PM

Comment made by: scgilardi

http://dev.clojure.org/jira/browse/CLJ-1716 may cover this well enough that this issue can be closed.

Stuart Sierra September 5, 2014 at 9: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.

Ivan Kozik July 13, 2014 at 4:35 AM

Attaching sample output

Completed

Details

Assignee

Reporter

Approval

Ok

Patch

Code

Priority

Fix versions

Created May 11, 2013 at 10:12 AM
Updated October 5, 2018 at 12:19 AM
Resolved October 5, 2018 at 12:19 AM