字符串长度超长时,提示文案中加上表名,避免有时候异常调用栈看不出来是哪张表
This commit is contained in:
parent
52140de3c7
commit
e8ceea7a20
|
@ -416,9 +416,9 @@ public partial class Entity<TEntity> : EntityBase, IAccessor where TEntity : Ent
|
|||
if (uk == null || this[uk.Name] is String str2 && str2.Length > 50) uk = Meta.Unique;
|
||||
|
||||
if (uk != null)
|
||||
throw new ArgumentOutOfRangeException(fi.Name, $"[{fi.Name}/{fi.DisplayName}]长度限制{fi.Length}字符[{uk.Name}={this[uk.Name]}]");
|
||||
throw new ArgumentOutOfRangeException(fi.Name, $"[{fi.Name}/{fi.DisplayName}@{factory.TableName}]长度限制{fi.Length}字符[{uk.Name}={this[uk.Name]}]");
|
||||
else
|
||||
throw new ArgumentOutOfRangeException(fi.Name, $"[{fi.Name}/{fi.DisplayName}]长度限制{fi.Length}字符");
|
||||
throw new ArgumentOutOfRangeException(fi.Name, $"[{fi.Name}/{fi.DisplayName}@{factory.TableName}]长度限制{fi.Length}字符");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue