BlueSky.App.CurrentDomain_UnhandledException C# (CSharp) Метод

CurrentDomain_UnhandledException() приватный Метод

private CurrentDomain_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
Результат void
        void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            ILoggerService logService = LifetimeService.Instance.Container.Resolve<ILoggerService>();
            logService.WriteToLogLevel("Unhandled Exception Occured :", LogLevelEnum.Fatal, e.ExceptionObject as Exception);
            MessageBox.Show("Unhandled:"+e.ExceptionObject.ToString(), "Fatal Error", MessageBoxButton.OK, MessageBoxImage.Error);
            GracefulExit();
            Environment.Exit(0);//We can remove this and can try to recover APP and keep it running.
        }