diff options
author | sr55 <[email protected]> | 2011-05-14 14:46:16 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-05-14 14:46:16 +0000 |
commit | 407aa2324adb84d97a61ddefde22178dff5c6063 (patch) | |
tree | 40ab418a4016065d5fc829f2935a690f6d5b3bac /win/CS/Program.cs | |
parent | e710acff9681ba85b7bddf65d001bc0444d4a69d (diff) |
WinGui:
- Removed the Question Alert box when adding an item to the queue where the destination folder does not exist. The folder is automatically created before encode anyway, so no point in asking the user pre-Encode.cs
- Better error handling in the encode service.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3979 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Program.cs')
-rw-r--r-- | win/CS/Program.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/win/CS/Program.cs b/win/CS/Program.cs index acdaf0266..132624b28 100644 --- a/win/CS/Program.cs +++ b/win/CS/Program.cs @@ -10,6 +10,7 @@ namespace Handbrake using System.IO;
using System.Windows.Forms;
+ using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Services;
using Handbrake.Properties;
@@ -111,10 +112,24 @@ namespace Handbrake private static void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
try
- {
+ {
ExceptionWindow window = new ExceptionWindow();
- window.Setup("An Unknown Error has occured.", e.ExceptionObject.ToString());
- window.ShowDialog();
+
+ if (e.ExceptionObject.GetType() == typeof(GeneralApplicationException))
+ {
+ GeneralApplicationException applicationException = e.ExceptionObject as GeneralApplicationException;
+ if (applicationException != null)
+ {
+ window.Setup(
+ applicationException.Error + Environment.NewLine + applicationException.Solution,
+ e.ExceptionObject + "\n\n ---- \n\n" + applicationException.ActualException);
+ }
+ }
+ else
+ {
+ window.Setup("An Unknown Error has occured.", e.ExceptionObject.ToString());
+ }
+ window.ShowDialog();
}
catch (Exception)
{
@@ -124,7 +139,6 @@ namespace Handbrake MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
-
}
public static int InstanceId;
|