AA2Install.Program.CurrentDomain_UnhandledException C# (CSharp) Method

CurrentDomain_UnhandledException() static private method

static private CurrentDomain_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
return void
        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            /*if (e.IsTerminating)
            {

            }*/
            if (saveLog(e.ExceptionObject as Exception))
            {
                var crash = new formCrash((e.ExceptionObject as Exception).Message + Environment.NewLine + (e.ExceptionObject as Exception).StackTrace, "AA2Install crash " + DateTime.Now.ToString("d-M-yyyy hh-mm-ss") + ".dmp");
                crash.ShowDialog();
                }
            else
            {
                var crash = new formCrash((e.ExceptionObject as Exception).Message + Environment.NewLine + (e.ExceptionObject as Exception).StackTrace);
                crash.ShowDialog();
            }
            Application.Exit();
        }