internal void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { var ex = e.Exception; if (ex != null) { string error = "CRITICAL Dispatcher: " + ex.Message; MessageBox.Show(error); DebugLog.LogError(error); DebugLog.LogError("STACKTRACE: " + ex.StackTrace); } else { const string error = "CRITICAL Dispatcher: Unknown error"; MessageBox.Show(error); DebugLog.LogError(error); } DebugLog.Dispose(); Environment.Exit(2); }
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { var ex = e.ExceptionObject as Exception; if (ex != null) { string error = "CRITICAL AppDomain: " + ex.Message; MessageBox.Show(error); DebugLog.LogError(error); DebugLog.LogError("STACKTRACE: " + ex.StackTrace); } else { const string error = "CRITICAL AppDomain: Unknown error"; MessageBox.Show(error); DebugLog.LogError(error); } DebugLog.Dispose(); Environment.Exit(2); }
public void WriteLogsAndDispose() { DebugLog.WriteCoreLine("Testing log item"); DebugLog.Dispose(); }
private void Context_EndRequest(object sender, EventArgs e) { DebugLog.Dispose(); }