PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms AppDomain.CurrentDomain.UnhandledException in Smart Client

Reply

AppDomain.CurrentDomain.UnhandledException in Smart Client

 
Thread Tools Rate Thread
Old 03-06-2005, 10:28 AM   #1
=?Utf-8?B?TWFnZXNo?=
Guest
 
Posts: n/a
Default AppDomain.CurrentDomain.UnhandledException in Smart Client


Hi,

AppDomain.CurrentDomain.UnhandledException doesnt seem to work in Smart
Client application.

Here is the code snippet.

public static void Main()
{
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(UnhandledExceptionHandler);
Application.Run(new MainForm());

}

static void UnhandledExceptionHandler(object sender,
UnhandledExceptionEventArgs e)
{
Exception ex = (Exception)(e.ExceptionObject);
MessageBox.Show(ex.ToString());
}

tried declaring the UnhandledExceptionHandler proc to instance method but
still no luck.

Thanks for the help.

Magesh
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off