コード例 #1
0
 private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     if (e.Exception is Exception ex)
     {
         LogStatic.Exception(ex);
     }
     else
     {
         LogStatic.Message("an empty DispatcherUnhandledException was thrown");
     }
 }
コード例 #2
0
        public static int Main()
        {
            App app = new App();

            int exitCode = app.Run();

            if (exitCode != 0)
            {
                string message = string.Format(CultureInfo.CurrentCulture, "exited with code {0}", exitCode);

                LogStatic.Message(message);
            }

            return(exitCode);
        }