package com.tofly.watermeter.common.exceptions;


/**
 * @author wujianjun
 * @date 2023/4/19 13:43
 * 自定义异常
 * 不会被service返回类型而限制
 * 便于解耦，链接群,
 */
public class MeiCunException extends RuntimeException {

    private ResponseStatusEnum responseStatusEnum;

    public MeiCunException(ResponseStatusEnum responseStatusEnum) {
        super("异常状态码为：" + responseStatusEnum.status() +
                "异常信息为：" + responseStatusEnum.msg());
        this.responseStatusEnum = responseStatusEnum;
    }

    public ResponseStatusEnum getResponseStatusEnum() {
        return responseStatusEnum;
    }

    public void setResponseStatusEnum(ResponseStatusEnum responseStatusEnum) {
        this.responseStatusEnum = responseStatusEnum;
    }
}
