From 8917ea9cc9075a4bae958bd3b4b28128d2e6b833 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 7 Jul 2015 22:20:16 +0200 Subject: [PATCH] Don't log invalid date in rss as Error. Fixes #635 --- src/NzbDrone.Core/Parser/Parser.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 446733629..d53f5ca19 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -644,7 +644,16 @@ namespace NzbDrone.Core.Parser airmonth = tempDay; } - var airDate = new DateTime(airYear, airmonth, airday); + DateTime airDate; + + try + { + airDate = new DateTime(airYear, airmonth, airday); + } + catch (Exception) + { + throw new InvalidDateException("Invalid date found: {0}-{1}-{2}", airYear, airmonth, airday); + } //Check if episode is in the future (most likely a parse error) if (airDate > DateTime.Now.AddDays(1).Date || airDate < new DateTime(1970, 1, 1))