diff options
author | sr55 <[email protected]> | 2012-02-15 20:03:10 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-02-15 20:03:10 +0000 |
commit | 1d8bc5dd7d36da0167e572762b6f20db20289012 (patch) | |
tree | 20e3a5164ff24bb6d44504e587fb14dc9a92d5bd /win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs | |
parent | 4da15bcbbbd800b7af230294224f0d7248e8dd72 (diff) |
WinGui: Fix a couple of trival gui bugs and force all exceptions to be handled by the built-in exception handler rather than the .NET one.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4449 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs index b4a23231e..84c6252a2 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Services.Base using System.Text;
using HandBrake.ApplicationServices.EventArgs;
+ using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -59,7 +60,7 @@ namespace HandBrake.ApplicationServices.Services.Base /// </summary>
public EncodeBase()
{
- this.logBuffer = new StringBuilder();
+ this.logBuffer = new StringBuilder();
}
#region Events
@@ -363,18 +364,18 @@ namespace HandBrake.ApplicationServices.Services.Base protected void VerifyEncodeDestinationPath(QueueTask task)
{
// Make sure the path exists, attempt to create it if it doesn't
- string path = Directory.GetParent(task.Destination).ToString();
- if (!Directory.Exists(path))
+ try
{
- try
+ string path = Directory.GetParent(task.Destination).ToString();
+ if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
- catch (Exception)
- {
- throw new Exception(
- "Unable to create directory for the encoded output. Please verify the drive and path is correct.");
- }
+ }
+ catch (Exception exc)
+ {
+ throw new GeneralApplicationException(
+ "Unable to create directory for the encoded output.", "Please verify that you have a valid path.", exc);
}
}
|