package cn.stylefeng.workflow.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.workflow.api.constants.VariableConstants;

public class VariableException extends ServiceException {

    public VariableException(AbstractExceptionEnum exception, Object... params) {
        super(VariableConstants.VARIABLE_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public VariableException(AbstractExceptionEnum exception) {
        super(VariableConstants.VARIABLE_MODULE_NAME, exception);
    }

}
