AcManager.EntryPoint.UnhandledExceptionHandler C# (CSharp) Method

UnhandledExceptionHandler() private method

private UnhandledExceptionHandler ( Exception e ) : void
e System.Exception
return void
        private static void UnhandledExceptionHandler(Exception e) {
            var text = e?.ToString() ?? @"?";

            if (!LogError(text)) {
                try {
                    var logFilename = $"{AppDomain.CurrentDomain.BaseDirectory}/content_manager_crash_{DateTime.Now.Ticks}.txt";
                    File.WriteAllText(logFilename, text);
                } catch (Exception) {
                    // ignored
                }
            }

            try {
                UnhandledExceptionFancyHandler(e);
                return;
            } catch (Exception ex) {
                LogError(ex.Message);

                try {
                    MessageBox.Show(text, "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                } catch (Exception) {
                    // ignored
                }
            }

            Environment.Exit(1);
        }

Same methods

EntryPoint::UnhandledExceptionHandler ( object sender, UnhandledExceptionEventArgs args ) : void