修改BUG:数据库异常日志对ex进行判断,为空时直接返回true
This commit is contained in:
parent
54a0d5a24e
commit
770c7c617b
|
@ -38,6 +38,8 @@ namespace Bootstrap.DataAccess.MongoDB
|
|||
/// <returns></returns>
|
||||
public override bool Log(Exception ex, NameValueCollection additionalInfo)
|
||||
{
|
||||
if (ex == null) return true;
|
||||
|
||||
var excep = new DataAccess.Exceptions
|
||||
{
|
||||
Id = null,
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace Bootstrap.DataAccess
|
|||
/// <returns></returns>
|
||||
public virtual bool Log(Exception ex, NameValueCollection additionalInfo)
|
||||
{
|
||||
if (ex == null) throw new ArgumentNullException(nameof(ex));
|
||||
if (ex == null) return true;
|
||||
|
||||
var errorPage = additionalInfo?["ErrorPage"] ?? (ex.GetType().Name.Length > 50 ? ex.GetType().Name.Substring(0, 50) : ex.GetType().Name);
|
||||
DbManager.Create().Insert(new Exceptions()
|
||||
|
|
Loading…
Reference in New Issue