【优化】检查table.name和value_type,不允许为空白字符串

main
walon 2022-03-29 00:44:06 +08:00
parent df932046e4
commit 7b7ab7b8ba
1 changed files with 8 additions and 1 deletions

View File

@ -273,7 +273,14 @@ namespace Luban.Job.Cfg.Defs
Tags = tags,
OutputFile = outputFileName,
};
if (string.IsNullOrWhiteSpace(name))
{
throw new Exception($"定义文件:{defineFile} table:'{p.Name}' name:'{p.Name}' 不能为空");
}
if (string.IsNullOrWhiteSpace(valueType))
{
throw new Exception($"定义文件:{defineFile} table:'{p.Name}' value_type:'{valueType}' 不能为空");
}
if (p.Groups.Count == 0)
{
p.Groups = this._defaultGroups;