diff options
author | sr55 <[email protected]> | 2012-05-20 01:11:36 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-05-20 01:11:36 +0000 |
commit | 332f03f3f68dca799a2e50ceb7e34578ac0bcd5f (patch) | |
tree | 8763d26c3f7b77fe2a0e1b4aaf59497da720d87d /win/CS/HandBrakeWPF/App.xaml.cs | |
parent | a8c98d2da676d507a0754ec191d53a1122a40220 (diff) |
WinGui: Initial Implementation of Add All to Queue. Fix the Queue so that it processes everything correctly rather than just the last job added.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4689 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/App.xaml.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/App.xaml.cs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs index 13efba30b..ff32ba5c9 100644 --- a/win/CS/HandBrakeWPF/App.xaml.cs +++ b/win/CS/HandBrakeWPF/App.xaml.cs @@ -59,7 +59,19 @@ namespace HandBrakeWPF private void Dispatcher_UnhandledException(
object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
- this.ShowError(e.Exception);
+ if (e.Exception.GetType() == typeof(GeneralApplicationException))
+ {
+ this.ShowError(e.Exception);
+ }
+ else if (e.Exception.InnerException.GetType() == typeof(GeneralApplicationException))
+ {
+ this.ShowError(e.Exception.InnerException);
+ }
+ else
+ {
+ this.ShowError(e.Exception);
+ }
+
e.Handled = true;
}
@@ -83,9 +95,19 @@ namespace HandBrakeWPF GeneralApplicationException applicationException = exception as GeneralApplicationException;
if (applicationException != null)
{
+ string details = string.Format(
+ "{0}{1}{2}{3}{4}",
+ applicationException.Error,
+ Environment.NewLine,
+ applicationException.Solution,
+ Environment.NewLine,
+ applicationException.ActualException != null
+ ? applicationException.ActualException.ToString()
+ : "No additional exception information available.");
+
errorView.ErrorMessage = applicationException.Error;
errorView.Solution = applicationException.Solution;
- errorView.Details = applicationException.ActualException.ToString();
+ errorView.Details = details;
}
}
else
|