AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_Unhan

  • Thread starter Thread starter Timothy Parez
  • Start date Start date
T

Timothy Parez

Hi,

I'm using
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

in my application to handle unhandled exceptions (duuh)

but my event handler is never triggered

private static void CurrentDomain_UnhandledException(object sender,
UnhandledExceptionEventArgs e)
{
//some code goes here
}

What am I doing wrong?

Thnx.
Tim.
 
* Timothy Parez said:
I'm using
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


in my application to handle unhandled exceptions (duuh)

but my event handler is never triggered

private static void CurrentDomain_UnhandledException(object sender,
UnhandledExceptionEventArgs e)

{
//some code goes here
}

What am I doing wrong?

If you are using Windows Forms, add a handler to 'Application.ThreadException' too
(see MSDN for more info).
 
Back
Top