File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
src/cider/nrepl/middleware/util
test/clj/cider/nrepl/middleware/util Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11
11
### Changes
12
12
13
13
* [ #550 ] ( https://github.com/clojure-emacs/cider-nrepl/pull/550 ) : Always return test documentation messages as strings.
14
+ * [ #563 ] ( https://github.com/clojure-emacs/cider-nrepl/pull/563 ) : Add : root-ex key to error summary that contains the classname of the root cause.
14
15
15
16
## 0.18.0 (2018-08-06)
16
17
Original file line number Diff line number Diff line change 37
37
used as the value for the :status key."
38
38
[ex & statuses]
39
39
(merge {:ex (str (class ex))
40
- :err (with-out-str (@print-cause-trace ex))}
40
+ :err (with-out-str (@print-cause-trace ex))
41
+ :root-ex (-> (#'clojure.main/root-cause ex) class str)}
41
42
(when statuses {:status (set statuses)})))
42
43
43
44
(defn pp-stacktrace
Original file line number Diff line number Diff line change 58
58
(is (deep-bencodable? [:a :vector 1 {:a :map } 2 '(:a {:bad-map *ns*} :list ) 3 ])
59
59
" Should pass since *ns* is inside a quoted list and doesn't get evaluated" )
60
60
(is (thrown? IllegalArgumentException (deep-bencodable? [:a :vector 1 {:a :map } 2 [:sub :vec :bad *ns*] '(:a :list ) 3 ]))))))
61
+
62
+ (deftest error-handler-root-ex
63
+ (let [e (Exception. " testing" (Throwable. " root-cause" ))
64
+ e2 (Exception. " testing2" )]
65
+ (is (= " class java.lang.Throwable"
66
+ (:root-ex (err/error-handler :done {:id 1 } e))))
67
+ (is (= " class java.lang.Exception"
68
+ (:root-ex (err/error-handler :done {:id 2 } e2))))))
You can’t perform that action at this time.
0 commit comments