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 53b2891

Browse files
committedJun 14, 2023
Do not use heuristics on exception breakpoints
1 parent 6bee102 commit 53b2891

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed
 

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

+10-15
Original file line numberDiff line numberDiff line change
@@ -597,22 +597,17 @@ this map (identified by a key), and will `dissoc` it afterwards."}
597597

598598
(defmacro breakpoint-if-exception
599599
"Wrap form in a try-catch that has breakpoint on exception.
600-
Ignores uninteresting forms.
601-
Uninteresting forms are symbols that resolve to `clojure.core`
602-
(taking locals into account), and sexps whose head is present in
603-
`irrelevant-return-value-forms`. Used as :breakfunction in `tag-form`."
600+
Used as :breakfunction in `tag-form`."
604601
[form dbg-state original-form]
605-
(if (uninteresting-form? &env form)
606-
form
607-
`(try ~form
608-
(catch Throwable ex#
609-
(let [exn-message# (.getMessage ex#)
610-
break-result# (expand-break exn-message# ~dbg-state ~original-form)]
611-
(if (= exn-message# break-result#)
612-
;; if they continued then rethrow the exception
613-
(throw ex#)
614-
;; otherwise return the value they injected
615-
break-result#))))))
602+
`(try ~form
603+
(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#)
607+
;; if they continued then rethrow the exception
608+
(throw ex#)
609+
;; otherwise return the value they injected
610+
break-result#)))))
616611

617612
;;; ## Data readers
618613
;;

0 commit comments

Comments
 (0)
Please sign in to comment.