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

public class FormException extends ServiceException {

    public FormException(AbstractExceptionEnum exception, Object... params) {
        super(FormConstants.FORM_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public FormException(AbstractExceptionEnum exception) {
        super(FormConstants.FORM_MODULE_NAME, exception);
    }

}
