
matrix.boot.common.exception.ServiceException Maven / Gradle / Ivy
package matrix.boot.common.exception;
/**
* 业务异常类
* @author wangcheng
*/
public class ServiceException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
* 错误编码
*/
private Integer errorCode;
public ServiceException() {
super();
}
public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public ServiceException(String message, Throwable cause) {
super(message, cause);
}
public ServiceException(String message) {
super(message);
}
public ServiceException(Throwable cause) {
super(cause.getMessage(), cause);
}
public Integer getErrorCode() {
return errorCode;
}
public ServiceException setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy