exceptionverification outputs exception info

pull/6/head
kay.one 11 years ago
parent a079c2732a
commit 32763b3667

@ -94,13 +94,16 @@ namespace NzbDrone.Core.Indexers
{ {
var result = new List<ReportInfo>(); var result = new List<ReportInfo>();
var body = "......";
foreach (var url in urls) foreach (var url in urls)
{ {
try try
{ {
_logger.Trace("Downloading Feed " + url); _logger.Trace("Downloading Feed " + url);
var stream = _httpProvider.DownloadStream(url); body = _httpProvider.DownloadString(url);
result.AddRange(indexer.Parser.Process(stream)); var stream = _httpProvider.DownloadStream(url);
result.AddRange(indexer.Parser.Process(stream));
} }
catch (WebException webException) catch (WebException webException)
{ {
@ -111,13 +114,13 @@ namespace NzbDrone.Core.Indexers
else else
{ {
webException.Data.Add("FeedUrl", url); webException.Data.Add("FeedUrl", url);
_logger.WarnException("An error occurred while processing feed. " + url, webException); _logger.WarnException("An error occurred while processing feed. " + url + " " + body, webException);
} }
} }
catch (Exception feedEx) catch (Exception feedEx)
{ {
feedEx.Data.Add("FeedUrl", url); feedEx.Data.Add("FeedUrl", url);
_logger.ErrorException("An error occurred while processing feed. " + url, feedEx); _logger.ErrorException("An error occurred while processing feed. " + url + " " + body, feedEx);
} }
} }

Loading…
Cancel
Save