Catch Postgres log connection errors

This commit is contained in:
Qstick
2022-05-14 10:05:42 -05:00
parent adf38f256b
commit a738cfb23a

View File

@@ -97,6 +97,11 @@ namespace NzbDrone.Core.Instrumentation
WritePostgresLog(log, connectionString);
}
}
catch (NpgsqlException ex)
{
InternalLogger.Error("Unable to save log event to database: {0}", ex);
throw;
}
catch (SQLiteException ex)
{
InternalLogger.Error("Unable to save log event to database: {0}", ex);