From 4cbfd38633ca3fe9957118c7e31b0ae6ab89b466 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Wed, 29 Jan 2025 21:07:43 -0600 Subject: [PATCH] misc: chore: [ci skip] Log errors from TaskScheduler.UnobservedTaskException --- src/Ryujinx/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index e35a37119..885d43ebb 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -93,7 +93,10 @@ namespace Ryujinx.Ava Console.Title = $"Ryujinx Console {Version}"; // Hook unhandled exception and process exit events. - AppDomain.CurrentDomain.UnhandledException += (sender, e) => ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating); + AppDomain.CurrentDomain.UnhandledException += (sender, e) + => ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating); + TaskScheduler.UnobservedTaskException += (sender, e) + => ProcessUnhandledException(e.Exception, false); AppDomain.CurrentDomain.ProcessExit += (sender, e) => Exit(); // Setup base data directory.