parent
c146cf6031
commit
82fbdb513f
|
|
@ -269,7 +269,7 @@ Options:
|
|||
}
|
||||
else
|
||||
{
|
||||
s_logger.Error("GenJob fail. err:{err} msg:{msg}", res.ErrCode, res.ErrMsg);
|
||||
s_logger.Error("GenJob fail. msg:{msg}", res.ErrMsg);
|
||||
if (!string.IsNullOrEmpty(res.StackTrace))
|
||||
{
|
||||
s_logger.Debug("StackTrace: {}", res.StackTrace);
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ namespace Luban.Job.Common.Defs
|
|||
{
|
||||
string containerTypeAndTags = DefUtil.TrimBracePairs(type.Substring(0, sepIndex));
|
||||
var elementTypeAndTags = type.Substring(sepIndex + 1);
|
||||
var (containerType, containerTags) = DefUtil.ParseType(containerTypeAndTags);
|
||||
var (containerType, containerTags) = DefUtil.ParseTypeAndVaildAttrs(containerTypeAndTags);
|
||||
return CreateContainerType(module, containerType, containerTags, elementTypeAndTags.Trim());
|
||||
}
|
||||
else
|
||||
|
|
@ -283,7 +283,7 @@ namespace Luban.Job.Common.Defs
|
|||
bool nullable;
|
||||
// 去掉 rawType 两侧的匹配的 ()
|
||||
rawType = DefUtil.TrimBracePairs(rawType);
|
||||
var (type, tags) = DefUtil.ParseType(rawType);
|
||||
var (type, tags) = DefUtil.ParseTypeAndVaildAttrs(rawType);
|
||||
|
||||
if (type.EndsWith('?'))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -183,7 +183,24 @@ namespace Luban.Job.Common.Utils
|
|||
}
|
||||
}
|
||||
|
||||
public static bool ParseOrientation(string value)
|
||||
public static (string, Dictionary<string, string>) ParseTypeAndVaildAttrs(string s)
|
||||
{
|
||||
var (typeStr, attrs) = ParseType(s);
|
||||
|
||||
if (attrs.ContainsKey("group"))
|
||||
{
|
||||
throw new Exception("group为保留属性,只能用于table或var定义,是否用错? 如在excel中请使用&group=xxx");
|
||||
}
|
||||
|
||||
if (attrs.ContainsKey("seq"))
|
||||
{
|
||||
throw new Exception("字段切割应该用'sep',而不是'seq',请检查是否拼写错误");
|
||||
}
|
||||
|
||||
return (typeStr, attrs);
|
||||
}
|
||||
|
||||
public static bool ParseOrientation(string value)
|
||||
{
|
||||
switch (value.Trim())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue