(.a ""), rightfully, throws an IllegalArgumentException without a :phase.
One can consider, however, that this IllegalArgumentException is "compiler-like", while it doesn't seem primarily distinguishable of other IllegalArgumentExceptions that may be thrown in more "runtime-like" situations.
My problem is that, as a tool maker, without such a distinction, all IllegalArgumentExceptions will be given the same treatment, while users would want a more concise treatment (e.g. no stacktraces shown) for compiler-like ones.
- Is there a recommended way to inspect runtime exceptions for determining if they represent something that, from the user point of view, represents "code that is invalid to begin with"?
- (this is an informal term to describe runtime exceptions that are compiler-like)
- Has it been considered to make this easier by e.g. attaching a
:ex-data, something) when the Clojure compiler/runtime can reliably do so?