package cn.stylefeng.team.meta.api.exception;

import cn.hutool.core.util.StrUtil;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
import cn.stylefeng.team.meta.api.constants.MetaConstants;

public class MetaException extends ServiceException {

    public MetaException(AbstractExceptionEnum exception, Object... params) {
        super(MetaConstants.META_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public MetaException(AbstractExceptionEnum exception) {
        super(MetaConstants.META_MODULE_NAME, exception);
    }

}
