1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

exceptionverification outputs exception info

This commit is contained in:
kay.one 2013-08-05 20:26:02 -07:00
parent a079c2732a
commit 32763b3667

View File

@ -94,13 +94,16 @@ private List<ReportInfo> Fetch(IIndexer indexer, IEnumerable<string> urls)
{
var result = new List<ReportInfo>();
var body = "......";
foreach (var url in urls)
{
try
{
_logger.Trace("Downloading Feed " + url);
var stream = _httpProvider.DownloadStream(url);
result.AddRange(indexer.Parser.Process(stream));
_logger.Trace("Downloading Feed " + url);
body = _httpProvider.DownloadString(url);
var stream = _httpProvider.DownloadStream(url);
result.AddRange(indexer.Parser.Process(stream));
}
catch (WebException webException)
{
@ -111,13 +114,13 @@ private List<ReportInfo> Fetch(IIndexer indexer, IEnumerable<string> urls)
else
{
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)
{
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);
}
}