You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is failing to add ::caught-fn to the message after resolving the :nrepl.middleware.caught/caught key so the wrapped "caught" function does not get that key—so that's a bug.
If I supply :nrepl.middleware.caught/caught-fn directly, instead of the caught key symbol, then it works:
(!2023)-> jolt -M:jolt:dev:test:runner
org.corfield.rephrase.nrepl-test
adds a wrapper that rephrases exceptions
√ adds a ::caught/caught key to the message
√ rephrases a ClassCastException
√ rephrases an ArityException
org.corfield.rephrase-test
prints exceptions to stderr
√ rephrases a ClassCastException
√ rephrases an ArityException
√ does not rephrase an IllegalStateException (but still reorders its stack trace)
Ran 6 test cases in 0.01728 seconds.
0 failures.
If I supply :nrepl.middleware.caught/caught as a symbol, which is what rephrase does for bb and Clojure, it fails on Jolt because of that missing key.
Activity
yogthos commentedon Sep 13, 2026
should be addressed here, let me know if that does the trick https://github.com/jolt-lang/nrepl/tree/v0.2.0
seancorfield commentedon Sep 14, 2026
I think it is failing to add
::caught-fnto the message after resolving the:nrepl.middleware.caught/caughtkey so the wrapped "caught" function does not get that key—so that's a bug.If I supply
:nrepl.middleware.caught/caught-fndirectly, instead of the caught key symbol, then it works:If I supply
:nrepl.middleware.caught/caughtas a symbol, which is whatrephrasedoes forbband Clojure, it fails on Jolt because of that missing key.See https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/middleware/caught.clj#L87-L88 which is missing from your implementation.
yogthos commentedon Sep 14, 2026
and hopefully this does it #9
seancorfield commentedon Sep 14, 2026
Confirmed fixed, by testing against the latest SHA.