File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 5
5
[cider.nrepl.middleware.pprint :as pprint]
6
6
[cider.nrepl.print-method]
7
7
[nrepl.middleware :refer [set-descriptor!]]
8
+ [nrepl.middleware.caught :refer [wrap-caught]]
8
9
[nrepl.middleware.session :refer [session]]
9
10
[nrepl.middleware.pr-values :refer [pr-values]]
10
11
[nrepl.server :as nrepl-server]))
228
229
in the `:inspect` slot will cause the last value returned by eval to
229
230
be inspected. Returns a string representation of the resulting
230
231
inspector's state in the `:value` slot."
231
- :requires #{" clone" #'pr-values}
232
+ :requires #{" clone" #'pr-values #'wrap-caught }
232
233
:expects #{" eval" }
233
234
:handles {" inspect-pop"
234
235
{:doc " Moves one level up in the inspector stack."
Original file line number Diff line number Diff line change 3
3
[cider.nrepl.middleware.util.cljs :as cljs]
4
4
[cider.nrepl.middleware.util.error-handling :refer [base-error-response
5
5
with-safe-transport]]
6
+ [nrepl.middleware.caught :as caught]
6
7
[nrepl.misc :refer [response-for]]
7
8
[nrepl.transport :as transport]
8
9
[orchard.inspect :as inspect])
40
41
; ; If the eval errored, propagate the exception as error in the
41
42
; ; inspector middleware, so that the client CIDER code properly
42
43
; ; renders it instead of silently ignoring it.
43
- (contains? (:status response) :eval-error )
44
- ( let [e ( or ( @session #'*e )
45
- ( Exception. ( or (:ex response) " " )) )
44
+ (and ( contains? (:status response) :eval-error )
45
+ ( contains? response ::caught/throwable ) )
46
+ ( let [e (::caught/throwable response)
46
47
resp (base-error-response msg e :inspect-eval-error :done )]
47
48
(.send transport resp))
48
49
You can’t perform that action at this time.
0 commit comments