fix(#I136OP): 使用最原始的数据库创建方法
#Comment comment #I136OP 防止数据库插入异常失败时导致死循环 #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I136OP
This commit is contained in:
parent
d399fcb07e
commit
e1cfda47e9
|
@ -98,18 +98,22 @@ namespace Bootstrap.DataAccess
|
|||
try
|
||||
{
|
||||
// 防止数据库写入操作失败后陷入死循环
|
||||
DbManager.Create().Insert(new Exceptions
|
||||
// fix https://gitee.com/LongbowEnterprise/dashboard/issues?id=I136OP
|
||||
using (var db = Longbow.Data.DbManager.Create())
|
||||
{
|
||||
AppDomainName = AppDomain.CurrentDomain.FriendlyName,
|
||||
ErrorPage = errorPage,
|
||||
UserId = additionalInfo?["UserId"],
|
||||
UserIp = additionalInfo?["UserIp"],
|
||||
ExceptionType = ex.GetType().FullName,
|
||||
Message = ex.Message,
|
||||
StackTrace = ex.StackTrace,
|
||||
LogTime = DateTime.Now,
|
||||
Category = category
|
||||
});
|
||||
db.Insert(new Exceptions
|
||||
{
|
||||
AppDomainName = AppDomain.CurrentDomain.FriendlyName,
|
||||
ErrorPage = errorPage,
|
||||
UserId = additionalInfo?["UserId"],
|
||||
UserIp = additionalInfo?["UserIp"],
|
||||
ExceptionType = ex.GetType().FullName,
|
||||
Message = ex.Message,
|
||||
StackTrace = ex.StackTrace,
|
||||
LogTime = DateTime.Now,
|
||||
Category = category
|
||||
});
|
||||
}
|
||||
ClearExceptions();
|
||||
}
|
||||
catch { }
|
||||
|
|
Loading…
Reference in New Issue