made some of useless exceptions to calm down.

This commit is contained in:
kay.one 2013-07-04 22:16:49 -07:00
parent cdcf2767fc
commit 2d41ebcc78
3 changed files with 7 additions and 9 deletions

View File

@ -10,11 +10,6 @@ namespace NzbDrone.Common
return string.Format(format, formattingArgs);
}
public static string Inject(this string format, params string[] formattingArgs)
{
return string.Format(format, formattingArgs.Cast<object>());
}
private static readonly Regex InvalidCharRegex = new Regex(@"[^a-z0-9\s-]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex InvalidSearchCharRegex = new Regex(@"[^a-z0-9\s-\.]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex CollapseSpace = new Regex(@"\s+", RegexOptions.Compiled | RegexOptions.IgnoreCase);

View File

@ -4,8 +4,6 @@ using System.Net;
using NLog;
using NzbDrone.Common;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Model;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.Indexers
@ -106,14 +104,14 @@ namespace NzbDrone.Core.Indexers
}
catch (WebException webException)
{
if (webException.Message.Contains("503"))
if (webException.Message.Contains("503") || webException.Message.Contains("timed out"))
{
_logger.Warn("{0} server is currently unavailable.{1} {2}", indexer.Name, url, webException.Message);
}
else
{
webException.Data.Add("FeedUrl", url);
_logger.ErrorException("An error occurred while processing feed. " + url, webException);
_logger.WarnException("An error occurred while processing feed. " + url, webException);
}
}
catch (Exception feedEx)

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using NLog;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
@ -59,6 +60,10 @@ namespace NzbDrone.Core.MediaCover
_logger.Info("Downloading {0} for {1} {2}", cover.CoverType, series.Title, cover.Url);
_httpProvider.DownloadFile(cover.Url, fileName);
}
catch (WebException e)
{
_logger.WarnException("Couldn't download media cover for " + series.TvdbId, e);
}
catch (Exception e)
{
_logger.ErrorException("Couldn't download media cover for " + series.TvdbId, e);