Synchronization code

This commit is contained in:
sunkaixuan 2023-07-10 20:37:16 +08:00
parent 4a2f11d954
commit b203a0a199
2 changed files with 23 additions and 1 deletions

View File

@ -214,6 +214,16 @@ namespace SqlSugar
return sql;
}
public override Action<SqlSugarException> ErrorEvent => it =>
{
if (base.ErrorEvent != null)
{
base.ErrorEvent(it);
}
if (it.Message != null && it.Message.Contains("Detail redacted as it may contain sensitive data."))
{
Check.ExceptionEasy(it.Message, $"错误:可能是字段太小超出,详细错误:{it.Message} ");
}
};
}
}

View File

@ -215,5 +215,17 @@ namespace SqlSugar
return sql;
}
public override Action<SqlSugarException> ErrorEvent => it =>
{
if (base.ErrorEvent != null)
{
base.ErrorEvent(it);
}
if (it.Message != null && it.Message.Contains("Detail redacted as it may contain sensitive data."))
{
Check.ExceptionEasy(it.Message, $"错误:可能是字段太小超出,详细错误:{it.Message} ");
}
};
}
}