diff --git a/Bootstrap.DataAccess.MongoDB/Exceptions.cs b/Bootstrap.DataAccess.MongoDB/Exceptions.cs index dab2fa63..fe8d2200 100644 --- a/Bootstrap.DataAccess.MongoDB/Exceptions.cs +++ b/Bootstrap.DataAccess.MongoDB/Exceptions.cs @@ -38,6 +38,8 @@ namespace Bootstrap.DataAccess.MongoDB /// public override bool Log(Exception ex, NameValueCollection additionalInfo) { + if (ex == null) return true; + var excep = new DataAccess.Exceptions { Id = null, diff --git a/Bootstrap.DataAccess/Exceptions.cs b/Bootstrap.DataAccess/Exceptions.cs index b7a5b1c6..0f8f8e0a 100644 --- a/Bootstrap.DataAccess/Exceptions.cs +++ b/Bootstrap.DataAccess/Exceptions.cs @@ -76,7 +76,7 @@ namespace Bootstrap.DataAccess /// 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()