diff --git a/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs b/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs index 329c2d5..99f586e 100644 --- a/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs +++ b/Falcon.SugarApi/DatabaseDefinitions/SugarDbContext.cs @@ -46,7 +46,12 @@ namespace Falcon.SugarApi.DatabaseDefinitions cn.CreateNew(createBy); } } - this.Insertable(data).ExecuteCommand(); + try { + this.Insertable(data).ExecuteCommand(); + } + catch (Exception ex) { + throw new Exception("SugarDbContext.Insert数据发生异常!", ex); + } } ///