
Untitled
By: a guest on
May 29th, 2012 | syntax:
None | size: 0.52 KB | hits: 10 | expires: Never
How do I continue running after an unhandled exception?
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
var exception = e.ExceptionObject as Exception;
if (exception != null) MessageBox.Show(exception.Message + " - " + exception.StackTrace);
}
if (myByteArray != null)
{
myIPAddress = new IPAddress(myByteArray);
}