void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { log.Fatal(sender.ToString(), (System.Exception)e.ExceptionObject); App app = (App)Application.Current; string exception = GetHostDetails + Environment.NewLine + Environment.NewLine + e.ExceptionObject.ToString(); FatalErrorWindow fWindow = new FatalErrorWindow(exception); fWindow.ShowDialog(); }