Removed try/catch from CreateBackupZip.

Build NzbDrone.Common when debugging now.
This commit is contained in:
Mark McDowall 2012-01-26 21:24:41 -08:00
parent 8ce6e8a08e
commit 1990f5ab8c
2 changed files with 11 additions and 17 deletions

View File

@ -28,26 +28,18 @@ namespace NzbDrone.Core.Providers
public virtual string CreateBackupZip()
{
try
{
var dbFile = _enviromentProvider.GetNzbDronoeDbFile();
var configFile = _enviromentProvider.GetConfigPath();
var zipFile = _enviromentProvider.GetConfigBackupFile();
var dbFile = _enviromentProvider.GetNzbDronoeDbFile();
var configFile = _enviromentProvider.GetConfigPath();
var zipFile = _enviromentProvider.GetConfigBackupFile();
using (var zip = new ZipFile())
{
zip.AddFile(dbFile, String.Empty);
zip.AddFile(configFile, String.Empty);
zip.Save(zipFile);
}
return zipFile;
}
catch (Exception ex)
using (var zip = new ZipFile())
{
logger.ErrorException("Failed to create backup zip", ex);
throw;
zip.AddFile(dbFile, String.Empty);
zip.AddFile(configFile, String.Empty);
zip.Save(zipFile);
}
return zipFile;
}
}
}

View File

@ -155,6 +155,7 @@ Global
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x64.ActiveCfg = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.ActiveCfg = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Debug|x86.Build.0 = Debug|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Any CPU.Build.0 = Release|Any CPU
{F2BE0FDF-6E47-4827-A420-DD4EF82407F8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
@ -167,6 +168,7 @@ Global
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x64.ActiveCfg = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.ActiveCfg = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Debug|x86.Build.0 = Debug|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Any CPU.Build.0 = Release|Any CPU
{BEC74619-DDBB-4FBA-B517-D3E20AFC9997}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU