public static int test() throws Exception {
try {
throw new Exception();
} catch (Exception e) {
System.out.println("catch");
throw new Exception();
} finally {
System.out.println("finally");
return 1;
}
}
这段代码在finally中调用了return,在此情况下所有的Throwable
s对象都不会被抛出