[CLJ-1293] Portable "catch-all" mechanism Created: 05/Nov/13 Updated: 28/Dec/14
|Patch:||Code and Test|
CLJS ticket/patch: http://dev.clojure.org/jira/browse/CLJS-661
This patch is more permissive than my patch for CLJS: The CLJS patch ensures :default catch blocks occur between non-default catch blocks and finally blocks, if present. This patch just makes (catch :default ...) a synonym for (catch Throwable ...). I wanted to keep the change to the compiler minimum.
|Comment by Brandon Bloom [ 28/Dec/14 11:33 AM ]|
Noticed this switched from "Minor" to "Critical", so I figured I should mention that I later realized that we might want :default to catch Exception instead of Throwable, so as to avoid catching Error subclasses. Javadocs say: "An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch." If that's what we actually want, I can provide an updated patch.
|Comment by Alex Miller [ 28/Dec/14 2:19 PM ]|
Seems like an open question, might be best just to list it as such in the description.
I don't really expect to reach consensus on the ticket or patch right now, just trying to update priorities and raise visibility for discussion with Rich once we get to 1.8.