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 GeneratorException extends ServiceException {

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

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

}
