Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void WriteLogsAndDispose()
 {
     DebugLog.WriteCoreLine("Testing log item");
     DebugLog.Dispose();
 }
Ejemplo n.º 4
0
 private void Context_EndRequest(object sender, EventArgs e)
 {
     DebugLog.Dispose();
 }