Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd45364

Browse files
committedJun 14, 2023
Return the exception, add :caught-msg to response
1 parent 53b2891 commit bd45364

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/cider/nrepl/middleware/debug.clj

+3-3
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,9 @@ this map (identified by a key), and will `dissoc` it afterwards."}
601601
[form dbg-state original-form]
602602
`(try ~form
603603
(catch Throwable ex#
604-
(let [exn-message# (.getMessage ex#)
605-
break-result# (expand-break exn-message# ~dbg-state ~original-form)]
606-
(if (= exn-message# break-result#)
604+
(let [~'STATE__ (assoc-in ~'STATE__ [:msg :caught-msg] (.getMessage ex#))
605+
break-result# (expand-break ex# ~dbg-state ~original-form)]
606+
(if (= ex# break-result#)
607607
;; if they continued then rethrow the exception
608608
(throw ex#)
609609
;; otherwise return the value they injected

0 commit comments

Comments
 (0)
Please sign in to comment.