5 ms·
-way- is not the problem here. The java.lang.Exception is. :-) Throw specialized "Runtime Exceptions" would be the way to go. For example throw IllegalArgumentE
by alrex021 17y ago
-way- is not the problem here. The java.lang.Exception is. :-)
Throw specialized "Runtime Exceptions" would be the way to go. For example throw IllegalArgumentException runtime exception if function call receives inappropriate arguments.
You can also define your own specific (app-level) exception by proxying the RuntimeException or other relevant using the clojure's proxy macro.
- jacquesm 17y agoAh right! Apologies, I took it to mean that there was a better way of throwing an exception, not that particular one. Of course, that makes perfect sense.