diff options
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 19 |
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 |