Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling unhandled exceptions
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Divers
Thread ID:
01035413
Message ID:
01037505
Vues:
15
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform