Пример #1
0
        private static void doHandleExceptionLastResort(object o)
        {
            Exception ex = null;

            // About all the swallowed exceptions.
            // We have already thrown. If the handler throws too, all bets are really of - nothing left to do here.
            try
            {
                // Get out exception object. I don't think this can fail, but still safer inside try block.
                ex = o as Exception;
                // Close main window
                mf.ForceClose();
            }
            catch { }
            // Log error to file. This we know is thread-safe.
            ZD.Gui.AppErrorLogger.Instance.LogException(ex, true);
            // On to error form
            try
            {
                // Show nice error form
                using (FatalErrorForm f = new FatalErrorForm(tprov))
                {
                    f.ShowDialog();
                }
            }
            catch { }
        }
Пример #2
0
 private static void doHandleExceptionLastResort(object o)
 {
     Exception ex = null;
     // About all the swallowed exceptions.
     // We have already thrown. If the handler throws too, all bets are really of - nothing left to do here.
     try
     {
         // Get out exception object. I don't think this can fail, but still safer inside try block.
         ex = o as Exception;
         // Close main window
         mf.ForceClose();
     }
     catch { }
     // Log error to file. This we know is thread-safe.
     ZD.Gui.AppErrorLogger.Instance.LogException(ex, true);
     // On to error form
     try
     {
         // Show nice error form
         using (FatalErrorForm f = new FatalErrorForm(tprov))
         {
             f.ShowDialog();
         }
     }
     catch { }
 }