Browse Source

Synchronization code

pull/40/head
sunkaixuan 1 year ago
parent
commit
b203a0a199
  1. 12
      Src/Asp.Net/SqlSugar/Realization/Dm/DmProvider.cs
  2. 12
      Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs

12
Src/Asp.Net/SqlSugar/Realization/Dm/DmProvider.cs

@ -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} ");
}
};
}
}

12
Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs

@ -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} ");
}
};
}
}

Loading…
Cancel
Save