Skip to content

Commit

Permalink
Fix deskband logging regression
Browse files Browse the repository at this point in the history
  • Loading branch information
srwi committed Sep 7, 2024
1 parent f6219c6 commit 664009c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions EverythingToolbar/Helpers/ToolbarLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ private static void InitializeExceptionLoggers(ILogger logger)
{
logger.Error((Exception)args.ExceptionObject, "Unhandled exception");
};
Application.Current.DispatcherUnhandledException += (sender, args) =>

if (Application.Current != null)
{
logger.Error(args.Exception, "Unhandled exception on UI thread");
};
// Not applicable for deskband
Application.Current.DispatcherUnhandledException += (sender, args) =>
{
logger.Error(args.Exception, "Unhandled exception on UI thread");
};
}
}

private static void ConfigureLogger()
Expand Down

0 comments on commit 664009c

Please sign in to comment.