Skip to content

Commit

Permalink
Call SetObserved on unhandled exceptions from TaskScheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Neakita committed Feb 1, 2024
1 parent 41f6833 commit 900bf18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SightKeeper.Avalonia/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static void Main(string[] args)

private static void TaskSchedulerOnUnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e)
{
e.SetObserved();
Dispatcher.UIThread.InvokeAsync(() => HandleUnhandledExceptions(e.Exception, "TaskScheduler"), DispatcherPriority.Normal);
}

Expand Down

0 comments on commit 900bf18

Please sign in to comment.