public class TestException(){
public static void main(String[] args){
try{
int a=0;
throw new AntHdException("001","error");
}catch(AntHdException e){
System.out.println(e.getMessage());
}
}
}
AntHdException中没有super时,打印为null。
public class TestException(){
public static void main(String[] args){
try{
int a=0;
throw new AntHdException("001","error");
}catch(AntHdException e){
System.out.println(e.getMessage());
}
}
}
AntHdException中没有super时,打印为null。
本文标题:自定义异常
本文链接:https://www.haomeiwen.com/subject/oqqzfctx.html
网友评论