public class FpztException extends Exception {
private static final long serialVersionUID = 1L;
public int exceptionCode;
public FpztException() { //用来创建无参数对象
super();
}
public FpztException(int exceptionCode) {
this.exceptionCode = exceptionCode;
}
public FpztException(int exceptionCode,String msg){//用来创建指定参数对象
super(msg); //调用超类构造器
this.exceptionCode = exceptionCode;
}
public FpztException(String msg) {
super(msg);
}
public FpztException(String msg, Throwable cause) {
super(msg, cause);
}
public FpztException(Throwable cause) {
super(cause);
}
public int getExceptionCode(){
return this.exceptionCode;
}
}
自定义异常
最新推荐文章于 2023-08-08 08:44:24 发布