package com.yaoyicloud.exception;

import lombok.Getter;

/**
 * 业务异常
 *
 * @author jimmy
 * @version 1.0.0
 * @date 2022-10-09 19:32
 */
@Getter
public class EasierBizException extends RuntimeException {

    private static final long serialVersionUID = 1254338260038180257L;

    private final String errorCode;
    private final String errorMsgId;

    protected String serviceName;
    protected Object[] params;

    public EasierBizException(String serviceName, String errorCode, String errorMsgId, Object[] params) {
        this(serviceName, errorCode, errorMsgId);
        this.params = params;
    }

    public EasierBizException(String serviceName, String errorCode, String errorMsgId) {
        this.serviceName = serviceName;
        this.errorCode = errorCode;
        this.errorMsgId = errorMsgId;
    }
}
