소스 검색

misc: chore: [ci skip] Log errors from TaskScheduler.UnobservedTaskException

Evan Husted 1 년 전
부모
커밋
11f29361eb
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 3
      src/Ryujinx/Program.cs
  2. 0 1
      src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs

+ 5 - 3
src/Ryujinx/Program.cs

@@ -112,7 +112,11 @@ namespace Ryujinx.Ava
             // Hook unhandled exception and process exit events.
             // Hook unhandled exception and process exit events.
             AppDomain.CurrentDomain.UnhandledException += (sender, e)
             AppDomain.CurrentDomain.UnhandledException += (sender, e)
                 => ProcessUnhandledException(sender, e.ExceptionObject as Exception, e.IsTerminating);
                 => ProcessUnhandledException(sender, e.ExceptionObject as Exception, e.IsTerminating);
+            TaskScheduler.UnobservedTaskException += (sender, e)
+                => ProcessUnhandledException(sender, e.Exception, false); 
             AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
             AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
+
+
             
             
             // Setup base data directory.
             // Setup base data directory.
             AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
             AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
@@ -282,9 +286,7 @@ namespace Ryujinx.Ava
                     log.PrintMsg(LogClass.Application, message);
                     log.PrintMsg(LogClass.Application, message);
             }
             }
             
             
-
-
-
+            
             if (isTerminating)
             if (isTerminating)
                 Exit();
                 Exit();
         }
         }

+ 0 - 1
src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs

@@ -34,7 +34,6 @@ namespace Ryujinx.Ava.UI.Windows
 #if DEBUG
 #if DEBUG
             this.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Alt));
             this.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Alt));
 #endif
 #endif
-            
         }
         }
 
 
         public SettingsWindow()
         public SettingsWindow()