fix(测试跟踪): 功能用例导入格式不对提示优化

--bug=1015226 --user=陈建星 【测试跟踪】导入功能用例,上传错误格式的xlsx文件,报错“java.lang.NullPointerException” https://www.tapd.cn/55049933/s/1208306
This commit is contained in:
AnAngle 2022-07-24 00:32:54 +08:00 committed by jianxing
parent a04d3906cb
commit d1aa194791
1 changed files with 3 additions and 1 deletions

View File

@ -122,7 +122,9 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
//根据excel数据实体中的javax.validation + 正则表达式来校验excel数据 //根据excel数据实体中的javax.validation + 正则表达式来校验excel数据
errMsg = ExcelValidateHelper.validateEntity(testCaseExcelData); errMsg = ExcelValidateHelper.validateEntity(testCaseExcelData);
//自定义校验规则 //自定义校验规则
errMsg = validate(testCaseExcelData, errMsg); if (StringUtils.isEmpty(errMsg)) {
errMsg = validate(testCaseExcelData, errMsg);
}
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
errMsg = Translator.get("parse_data_error"); errMsg = Translator.get("parse_data_error");
LogUtil.error(e.getMessage(), e); LogUtil.error(e.getMessage(), e);