From 3bd7d28d3f2120c093c707a86d1f6fd99fab28f9 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 20 Nov 2011 19:58:32 -0800 Subject: [PATCH] Fixed bug in ExceptionVerification. --- NzbDrone.Test.Common/ExceptionVerification.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Test.Common/ExceptionVerification.cs b/NzbDrone.Test.Common/ExceptionVerification.cs index 8e455f401..9033cf011 100644 --- a/NzbDrone.Test.Common/ExceptionVerification.cs +++ b/NzbDrone.Test.Common/ExceptionVerification.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Test.Common string exception = ""; if (log.Exception != null) { - exception = "[" + log.Exception.Message + "]"; + exception = String.Format("[{0}: {1}]", log.Exception.GetType(), log.Exception.Message); } errors += Environment.NewLine + String.Format("[{0}] {1}: {2} {3}", log.Level, log.LoggerName, log.FormattedMessage, exception); @@ -76,7 +76,7 @@ namespace NzbDrone.Test.Common public static void MarkInconclusive(Type exception) { - var inconclusiveLogs = _logs.Where(l => l.Exception.GetType() == exception).ToList(); + var inconclusiveLogs = _logs.Where(l => l.Exception != null && l.Exception.GetType() == exception).ToList(); if (inconclusiveLogs.Count != 0) {