Hey all, https://clojure.atlassian.net/browse/CLJ-2504 just caught my eyes, and I was wondering about the overall aspect of error messages, what you might recommend for 1) having errors sent over the wire to a tutor 2) overriding error texts that come from clojure and not directly from the underlying Java core (is there any code convention used across the language core, to be followed for meta-programming for overriding of error texts?)
Hope it's an okay question for the dev channel
The approach I might take in such a situation is to provide a library you need to require first. This library patches certain functions in the Clojure namespace to catch specific errors, and rethrows them as other errors.
These functions could be parts of the Clojure compiler.
It does require students to get at least far enough to require this library (this could be done implicitly in e.g. leiningen profiles), but it feels like a more “lispy” way of approaching the problem.