top.lingkang.finalvalidated.error.CheckException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of final-validator Show documentation
Show all versions of final-validator Show documentation
final-validator 是一个JavaBean元数据校验模型和方法验证,能够自定义注解来扩展校验范围,符合国内开发习惯的参数校验java库
The newest version!
package top.lingkang.finalvalidated.error;
/**
* @author lingkang
* Created by 2024/1/27
* 框架检查异常
*/
public class CheckException extends RuntimeException {
// 异常对象,通常用于记录解析前的异常
private Object errorObject;
public CheckException(String message) {
super(message);
}
public CheckException(String message, Throwable cause) {
super(message, cause);
errorObject = cause;
}
public CheckException(Throwable cause) {
super(cause);
}
public Object getErrorObject() {
return errorObject;
}
public CheckException setErrorObject(Object errorObject) {
this.errorObject = errorObject;
return this;
}
}