TryCatch跳转到了捕获

时间:2014-04-01 15:21:23

标签: java try-catch

如何在try catch中跳转到catch块:

try{

if(bla!=)
throws Exception();

}catch(exception){
//do
}

不起作用?

2 个答案:

答案 0 :(得分:1)

查看try-catch-finally块的流程

enter image description here

答案 1 :(得分:1)

bla!=后面应该是条件,throws应为throwException()应为new Exception()exception应为{{} 1}}

Exception e