When reporting uncaught ExceptionInfo from clojure.test, line number isn't calculated correctly

Description

(deftest t1 (throw (ex-info "msg" {}))) (t/test-vars [#'t1]) ERROR in (t1) (core.clj:4593) Uncaught exception, not in assertion. expected: nil actual: clojure.lang.ExceptionInfo: msg at clojure.core$ex_info.invoke (core.clj:4593) datascript.test/fn (:3) clojure.test$test_var$fn__7670.invoke (test.clj:704) clojure.test$test_var.invoke (test.clj:704) clojure.test$test_vars$fn__7692$fn__7697.invoke (test.clj:722) clojure.test$default_fixture.invoke (test.clj:674) ...

Here core.clj:4593 is the line in clojure/core.clj where ex-info function is defined. Instead, test should report a place where ex-info is called

Clojure.test already does some filtering for other cases, so I just extended it with this particular (and quite common) case.

Screened by: Alex Miller

Environment

None

Attachments

1
  • 30 Apr 2018, 08:37 PM

Activity

Show:
Completed

Details

Assignee

Reporter

Approval

Patch

Priority

Affects versions

Fix versions

Created April 30, 2018 at 8:35 PM
Updated September 14, 2018 at 10:21 PM
Resolved September 14, 2018 at 10:21 PM

Flag notifications