Skip to content

Send eval errors in JVM nREPL's shape - #11

Merged
yogthos merged 1 commit into
mainfrom
jvm-error-shape
Oct 12, 2026
Merged

yogthos merged 1 commit into
mainfrom
jvm-error-shape

Conversation

@yogthos

@yogthos yogthos commented Oct 12, 2026

Copy link
Copy Markdown
Member

Companion to jolt-lang/jolt#1323, which has jolt.nrepl/evaluate return the error the way JVM nREPL sends it (:err-msg, :ex-class, :root-ex-class, plus jolt.nrepl/err->msg).

The session worker forwards those: err in clojure.main/err->msg form, ex/root-ex as class strings with eval-error, then done on its own message. The worker's own catch path renders through err->msg when it exists. On a jolt without those keys the old message-only shape is kept, so this works on 0.8.21 as before (the new tests skip there).

Tests: the eval-error shape, a reader error with no stale trace, and output from realizing a lazy result reaching the client. Full suite passes against #1323 (78 tests) and against released 0.8.21.

On a jolt whose evaluate returns :err-msg/:ex-class/:root-ex-class, the
session worker now sends err in clojure.main/err->msg form, ex and root-ex as
class strings with eval-error, and done on its own message, as JVM nREPL
does. The worker's own catch path renders through jolt.nrepl/err->msg when it
exists. Older jolt keeps the message-only shape.
@yogthos
yogthos merged commit d779043 into main Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant