package com.junmp.jyzb.jyzbthirdparty.exception;

import cn.hutool.core.util.StrUtil;
import com.junmp.jyzb.jyzbthirdparty.bean.constant.ThirdPartyConstant;
import com.junmp.v2.common.exception.IExceptionEnum;
import com.junmp.v2.common.exception.base.ServiceException;

public class ThirdPartyException extends ServiceException {
    public ThirdPartyException(IExceptionEnum exception, Object... params) {
        super(ThirdPartyConstant.JYZB_MODULE_NAME, exception.getCode(), StrUtil.format(exception.getMessage(), params));
    }

    public ThirdPartyException(IExceptionEnum exception) {
        super(ThirdPartyConstant.JYZB_MODULE_NAME, exception);
    }
}
