Cleaned up a bunch of warnings

This commit is contained in:
Mark McDowall 2012-11-21 08:14:57 -08:00
parent 6897d44b38
commit dda7868215
9 changed files with 16 additions and 8 deletions

View File

@ -596,7 +596,6 @@ namespace NzbDrone.Core.Test
WithConfiguredIndexers();
const string fileName = "wombles.xml";
const string expectedString = "nzbdetails";
Mocker.GetMock<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
@ -635,7 +634,6 @@ namespace NzbDrone.Core.Test
{
WithConfiguredIndexers();
const string fileName = "nzbindex.xml";
const string expectedString = "release";
Mocker.GetMock<HttpProvider>()

View File

@ -220,8 +220,7 @@ namespace NzbDrone.Core
}
parsedEpisode = new EpisodeParseResult
{
{
AirDate = new DateTime(airyear, airmonth, airday).Date,
};
}

View File

@ -206,6 +206,7 @@ namespace NzbDrone.Core.Providers
catch (UnauthorizedAccessException ex)
{
Logger.Debug("Unable to apply folder permissions to: ", newFile.FullName);
Logger.TraceException(ex.Message, ex);
}
episodeFile.Path = newFile.FullName;

View File

@ -140,6 +140,7 @@ namespace NzbDrone.Core.Providers
catch (Exception ex)
{
Logger.Error("Invalid address {0}, please correct the site URL.", url);
Logger.TraceException(ex.Message, ex);
throw;
}

View File

@ -28,11 +28,10 @@ namespace NzbDrone.Core.Providers
EpisodeStatus = episodeStatus.ToString(),
Quality = (quality == null ? String.Empty : quality.Quality.ToString())
});
var test = 0;
}
catch (Exception ex)
{
logger.Trace("Error");
logger.TraceException("Error", ex);
throw;
}
}

View File

@ -61,6 +61,7 @@ namespace NzbDrone.Core.Providers
catch(Exception ex)
{
Logger.Error("Error sending email. Subject: {0}", email.Subject);
Logger.TraceException(ex.Message, ex);
}
}

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NLog;
using NzbDrone.Services.Service.Repository;
using Services.PetaPoco;
@ -11,6 +12,8 @@ namespace NzbDrone.Services.Service.Providers
{
private readonly IDatabase _database;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public SceneMappingProvider(IDatabase database)
{
_database = database;
@ -74,6 +77,7 @@ namespace NzbDrone.Services.Service.Providers
}
catch (Exception ex)
{
logger.WarnException("Unable to promote scene mapping", ex);
return false;
}
@ -93,6 +97,7 @@ namespace NzbDrone.Services.Service.Providers
}
catch (Exception ex)
{
logger.WarnException("Unable to promote all scene mappings", ex);
return false;
}

View File

@ -80,11 +80,11 @@
<Name>NzbDrone.Common</Name>
</ProjectReference>
<ProjectReference Include="..\NzbDrone.Test.Common\NzbDrone.Test.Common.csproj">
<Project>{CADDFCE0-7509-4430-8364-2074E1EEFCA2}</Project>
<Project>{caddfce0-7509-4430-8364-2074e1eefca2}</Project>
<Name>NzbDrone.Test.Common</Name>
</ProjectReference>
<ProjectReference Include="..\NzbDrone.Update\NzbDrone.Update.csproj">
<Project>{4CCC53CD-8D5E-4CC4-97D2-5C9312AC2BD7}</Project>
<Project>{4ccc53cd-8d5e-4cc4-97d2-5c9312ac2bd7}</Project>
<Name>NzbDrone.Update</Name>
</ProjectReference>
</ItemGroup>

View File

@ -1,4 +1,5 @@
using System.Web.Mvc;
using NLog;
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Providers.DownloadClients;
@ -21,6 +22,8 @@ namespace NzbDrone.Web.Controllers
private readonly XbmcProvider _xbmcProvider;
private readonly PlexProvider _plexProvider;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public CommandController(JobProvider jobProvider, SabProvider sabProvider,
SmtpProvider smtpProvider, TwitterProvider twitterProvider,
EpisodeProvider episodeProvider, GrowlProvider growlProvider,
@ -133,6 +136,7 @@ namespace NzbDrone.Web.Controllers
}
catch(Exception ex)
{
logger.TraceException(ex.Message, ex);
return JsonNotificationResult.Oops("Couldn't register and test Growl");
}
}