All Downloads are FREE. Search and download functionalities are using the official Maven repository.

matrix.boot.common.exception.ServiceException Maven / Gradle / Ivy

There is a newer version: 2.1.11
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy