clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
matan 2019-09-14T11:23:55.002300Z

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?)

matan 2019-09-14T11:24:06.002600Z

Hope it's an okay question for the dev channel

2019-09-14T18:09:50.006700Z

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.

2019-09-14T18:10:26.007500Z

These functions could be parts of the Clojure compiler.

2019-09-14T18:11:37.009300Z

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.