summaryrefslogtreecommitdiffstats
path: root/win/C#/Program.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-05-18 16:23:25 +0000
committersr55 <[email protected]>2010-05-18 16:23:25 +0000
commit9d86956c37eb3ae8bdb02275aac9e2db8cee187b (patch)
treece85ae1c15f2a9ede0321c7fba73492b1b0847a8 /win/C#/Program.cs
parent8ce6a2514aa10e3ad28c34b8933238001b15c7d4 (diff)
WinGui:
- Added an exception window which allows the exceptions to be copied by the user rather than using a message box. (Long overdue). Moved some of the most common exceptions over to using it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3301 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r--win/C#/Program.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index 8600fe569..3ce379ea4 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -83,11 +83,20 @@ namespace Handbrake
/// <param name="e">Unhandled Exception EventArgs </param>
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- MessageBox.Show(
- "An unexpected error has occured.\n\nSender:" + sender + "\n\nException:" + e.ExceptionObject,
- "Unhandled Exception",
- MessageBoxButtons.OK,
- MessageBoxIcon.Error);
+ try
+ {
+ frmExceptionWindow exceptionWindow = new frmExceptionWindow();
+ exceptionWindow.Setup("An Unknown Error has occured.", e.ExceptionObject.ToString());
+ exceptionWindow.ShowDialog();
+ }
+ catch (Exception)
+ {
+ MessageBox.Show(
+ "An Unknown Error has occured. \n\n Exception:" + e.ExceptionObject,
+ "Unhandled Exception",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error);
+ }
}
}
} \ No newline at end of file