27 February 2004 - java_dev (original) (raw)

10:20 pm - dplass - Static exceptions What do y'all think of this code:public class Foo { private static final Exception bad; static { bad = new Exception(); } public void amethod() throws Exception { throw bad; } } I though this was REALLY weird. Would'n't it screw up the call stack to throw an exception that is statically allocated?