mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix task scheduler unobserved task exception window issue
This commit is contained in:
parent
eaac72b696
commit
5045f19ebe
1 changed files with 3 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using NLog;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Exception;
|
||||
using NLog;
|
||||
|
||||
namespace Flow.Launcher.Helper;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public static class ErrorReporting
|
|||
public static void TaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
|
||||
{
|
||||
//handle unobserved task exceptions
|
||||
Report(e.Exception);
|
||||
Application.Current.Dispatcher.Invoke(() => Report(e.Exception));
|
||||
//prevent application exist, so the user can copy prompted error info
|
||||
e.SetObserved();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue