Exemple #1
0
 public static void FireProcessExit()
 {
     try
     {
         Trace.WriteLine("CurrentDomain.ProcessExit");
         Fire(ProcessExit.Instance);
     }
     catch (Exception ex)
     {
         Bugs.LastResortEmergencyLog("CurrentDomain.ProcessExit() " + ex);
     }
 }
Exemple #2
0
        private static void OnUnhandledException(Exception e, bool terminating)
        {
            if (e != null)
            {
                try
                {
                    Bugs.Break("Unhandled exception " + e.ToString());
                    Fire(new UnhandledException(e));
                }
                catch (Exception ex)
                {
                    Bugs.LastResortEmergencyLog("while handling unhandled exception " + ex);
                }
            }

            if (terminating)
            {
                FireProcessExit();
            }
        }