package cn.stylefeng.team.generator.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.generator.api.constants.GenerationConstants;

public class GenerationException extends ServiceException {

    public GenerationException(AbstractExceptionEnum exception, Object... params) {
        super(GenerationConstants.GENERATION_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public GenerationException(AbstractExceptionEnum exception) {
        super(GenerationConstants.GENERATION_MODULE_NAME, exception);
    }

}
