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

public class ViewException extends ServiceException {

    public ViewException(AbstractExceptionEnum exception, Object... params) {
        super(ViewConstants.VIEW_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public ViewException(AbstractExceptionEnum exception) {
        super(ViewConstants.VIEW_MODULE_NAME, exception);
    }

}
