Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling unhandled exceptions
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01035413
Message ID:
01037505
Views:
16
This is what we do in a console app. This is only for console apps.
static int Main()
{
System.AppDomain.CurrentDomain.UnhandledException += new
				UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
.
.
.
}


private static void CurrentDomain_UnhandledException(object sender,
			UnhandledExceptionEventArgs e)
{
Exception ex = (Exception)e.ExceptionObject;

//usually we send an e-mail out here for console apps since most of the 
//time run on a server

}
Hope it helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform