Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Regarding to AppDomain.CurrentDomain.UnhandledException and logging.

$
0
0

Hi,

I used to work with Logging but can't regonize it how to do it with the right way.

AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

private static void HandleException(Exception ex) { if (ex == null) return;

this.logger.WriteMessage("");

// Do I need to put the Thread.Sleep here? MessageBox.Show(OnScreen_v2.Properties.Resources.UnhandledException); Environment.Exit(1); }

Do I need to put the Thread's sleep method there? I need to write error message to local disk.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>