diff options
author | sr55 <[email protected]> | 2010-08-29 20:41:07 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-08-29 20:41:07 +0000 |
commit | 466ea9a1a522e58dc972ffbba9deba3f615394a2 (patch) | |
tree | cf7b1ab9b3144d05b47c44967273c3f19cf74dd8 /win/C#/Program.cs | |
parent | c9973fa6ab5ed42b2219faa9a0c12e06ef74139e (diff) |
WinGui:
- Created an error service, renamed the frmExceptionWindow to ExceptionWindow and removed it's duplicate from the main project. It's all in the AppServices library.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3503 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index ff9174670..79b9a26cd 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -32,7 +32,7 @@ namespace Handbrake InstanceId = Process.GetProcessesByName("HandBrake").Length;
// Handle any unhandled exceptions
- AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
+ AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomainUnhandledException);
// Attempt to upgrade / keep the users settings between versions
if (Settings.Default.UpdateRequired)
@@ -105,22 +105,13 @@ namespace Handbrake /// </summary>
/// <param name="sender">The sender</param>
/// <param name="e">Unhandled Exception EventArgs </param>
- private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
+ private static void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- 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);
- }
+ MessageBox.Show(
+ "An Unknown Error has occured. \n\n Exception:" + e.ExceptionObject,
+ "Unhandled Exception",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error);
}
public static int InstanceId;
|