This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-04
Channels
- # announcements (1)
- # babashka (1)
- # beginners (84)
- # biff (22)
- # calva (9)
- # cider (8)
- # clerk (5)
- # clj-kondo (10)
- # clojure (105)
- # clojure-europe (13)
- # clojure-nl (1)
- # clojure-norway (44)
- # clojure-spec (4)
- # clojure-uk (6)
- # clojuredesign-podcast (36)
- # cursive (13)
- # datomic (24)
- # dev-tooling (8)
- # emacs (8)
- # hyperfiddle (4)
- # jobs (1)
- # leiningen (2)
- # london-clojurians (1)
- # lsp (5)
- # malli (6)
- # membrane (11)
- # nyc (1)
- # off-topic (14)
- # other-languages (8)
- # pathom (25)
- # pedestal (2)
- # re-frame (4)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (98)
- # sql (5)
- # squint (1)
- # tools-deps (38)
- # vim (8)
- # xtdb (11)
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 😄