62,614
社区成员
发帖
与我相关
我的任务
分享
final public Expression orExpression() throws ParseException {
Expression left;
Expression right;
left = andExpression();
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case OR:
;
break;
default:
break label_1;
}
jj_consume_token(OR);
right = andExpression();
left = LogicExpression.createOR(asBooleanExpression(left), asBooleanExpression(right));
}
{if (true) return left;}
throw new Error("Missing return statement in function");
}
private static int trouble(int j) throws ArithmeticException{
int i =10/0;//10/j
if(true) return 0;
throw new ArithmeticException ("from trouble()");
}
public static void foo(){
try{
pln(trouble(1));
}catch(ArithmeticException e){
pln("trouble"); ;
}
}
trouble(int j)在正常工作如10/j时,返回其值。代码中直接给异常。