diff options
author | sr55 <[email protected]> | 2011-05-21 19:05:24 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-05-21 19:05:24 +0000 |
commit | 7e9628855789c421849a24de4a4f46b7bb3b621d (patch) | |
tree | 595596b2637e82e1e4f337d0fc9e69714ffdac51 | |
parent | baf266c1ab47c8f7308ad69b34d94561d06c64a7 (diff) |
WinGui:
- Added some debug handling into the presets service which will hopefully make it easier to track down the reason why presets sometimes do not load correctly when updating to a newer nightly build.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3988 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/PresetService.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index 721b9b939..bd125c084 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -15,6 +15,7 @@ namespace HandBrake.ApplicationServices.Services using System.Windows;
using System.Xml.Serialization;
+ using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -372,10 +373,11 @@ namespace HandBrake.ApplicationServices.Services reader.Close();
}
}
- catch (Exception)
+ catch (Exception exc)
{
RecoverFromCorruptedPresetFile(this.builtInPresetFile);
this.UpdateBuiltInPresets(string.Empty);
+ throw new GeneralApplicationException("HandBrake has detected corruption in the presets file and has attempted to rebuild this file.", "Please restart HandBrake before continuing.", exc);
}
// Load in the users Presets from UserPresets.xml
@@ -393,9 +395,10 @@ namespace HandBrake.ApplicationServices.Services reader.Close();
}
}
- catch (Exception)
+ catch (Exception exc)
{
RecoverFromCorruptedPresetFile(this.userPresetFile);
+ throw new GeneralApplicationException("HandBrake has detected corruption in the presets file and has attempted to rebuild this file.", "Please restart HandBrake before continuing.", exc);
}
}
@@ -422,7 +425,7 @@ namespace HandBrake.ApplicationServices.Services }
catch (Exception exc)
{
- throw new Exception("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n", exc);
+ throw new GeneralApplicationException("Unable to write to the presets file.", "The details section below may indicate why this error has occured.", exc);
}
}
|