JAVA 业务异常 B

public class BusinessException extends Exception{

private static final long serialVersionUID = 1260274991732970117L;
private int code;

private BusinessException (String msg){
super(msg);
}

private BusinessException (String msg, Throwable t){
super(msg,t);
}

public BusinessException (int code , String msg){
this(msg);
this.code=code;
}

private int getCode(){
return this.code;
}

}

猜你喜欢

转载自blog.csdn.net/weixin_43355440/article/details/83864779