Static exceptions
What do y'all think of this code:
I though this was REALLY weird. Would'n't it screw up the call stack to throw an exception that is statically allocated?
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?
