clojure-style-guide
clojure-style-guide copied to clipboard
Add section warning against catching Throwables
I've noticed that many Clojure programmers use (catch Throwable t ...) as a means of not dealing with Exceptions. However, this is poor Java practice given that Errors are generally treated as "the application should fail" situations. As such, I think it would be nice to have a recommendation against using (catch Throwable t ...) alongside a nudge towards using explicit Error and Exception classes in catch clauses.
cf: Blind Rescues in the Ruby Style Guide, the recommendation of the Java Docs on Errors.