Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 29th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How do I continue running after an unhandled exception?
  2. AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
  3.  
  4. static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
  5.         {
  6.             var exception = e.ExceptionObject as Exception;
  7.             if (exception != null) MessageBox.Show(exception.Message + " - " + exception.StackTrace);
  8.         }
  9.        
  10. if (myByteArray != null)
  11. {
  12.     myIPAddress = new IPAddress(myByteArray);
  13. }