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

public class ProjectException extends ServiceException {

    public ProjectException(AbstractExceptionEnum exception, Object... params) {
        super(ProjectConstants.PROJECT_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public ProjectException(AbstractExceptionEnum exception) {
        super(ProjectConstants.PROJECT_MODULE_NAME, exception);
    }

}
