From 6109704fb0b695f0f5d3af8ea69d8daf6b702cac Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 4 Mar 2014 23:11:38 -0800 Subject: [PATCH] Only catch SQLite exceptions --- src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs | 3 ++- src/NzbDrone.Host/Owin/NlogTextWriter.cs | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index 36d942dfc..1ac73bd72 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -1,4 +1,5 @@ using System; +using System.Data.SQLite; using NLog.Common; using NLog.Config; using NLog; @@ -84,7 +85,7 @@ namespace NzbDrone.Core.Instrumentation { _repository.Insert(log); } - catch (Exception ex) + catch (SQLiteException ex) { InternalLogger.Error("Unable to save log event to database: {0}", ex); throw; diff --git a/src/NzbDrone.Host/Owin/NlogTextWriter.cs b/src/NzbDrone.Host/Owin/NlogTextWriter.cs index 5403d49c9..c503a5acf 100644 --- a/src/NzbDrone.Host/Owin/NlogTextWriter.cs +++ b/src/NzbDrone.Host/Owin/NlogTextWriter.cs @@ -1,8 +1,6 @@ -using System; -using System.IO; +using System.IO; using System.Text; using NLog; -using NzbDrone.Common.Instrumentation; namespace NzbDrone.Host.Owin {