Folks, for nREPL: what exactly is nrepl.middleware.caught/caught?
Basically, what I am trying to do, is to avoid printing to stderr when some exception happens - is it possible? Am I on the right track, or should I be doing something completely different?
I never used that caught middleware but from looking at the code, if that middleware is loaded then for every exception clojure.main/repl-caught will be called unless nrepl.middleware.caught/**caught-fn** is bound to something else.
clojure.main/repl-caught will print to std-err.
So I guess you can set that to nil like (set! nrepl.middleware.caught/*caught-fn* nil) and it shouldn't print to std-serr
Or just print to std-out with (set! nrepl.middleware.caught/*caught-fn* (fn [e] (println "ERROR ----" e)))
Yes, that was what I found too. Unfortunately, seems that not all implementations honor this key, so I'm not sure it'll be useful for me 😞
not sure I follow, wdym? I tried it on my cider setup, replacing the cought-fn and seams to work
Babashka still prints to stderr, for example, when an exception happens
oh I see bb, ok
Yeah, nREPL implementations I meant 😄