package com.ruoyi.common.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务异常
 * <p>不打印日志</p>
 * @author gaoxin
 * @date 2021/1/13 13:54
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {


    private static final long serialVersionUID = 7176507543712233770L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;

    public BusinessException(String message) {
        this.message = message;
    }

    public BusinessException(String message, Integer code)
    {
        this.message = message;
        this.code = code;
    }
}
