自定义异常类
在写业务的时候需要自定义异常类,以便于捕获自己抛出的异常信息
public class BizException extends RuntimeException {
private static final long serialVersionUID = 1L;
public BizException() {
}
public BizException(String message) {
super(message);
}
public BizException(String message, Throwable cause) {
super(message, cause);
}
public BizException(Throwable cause) {
super(cause);
}
}
参考java.util.concurrent.RejectedExecutionException