From: Liza Carvelli Date: Sun, 10 Aug 2025 18:23:16 +0000 (+0200) Subject: Log errors if clicking 'Start' in the UI fails X-Git-Tag: v6.0~2 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=7bccc4ba4b36453a4692acca351b7ef9c2acb8e9;p=Questionable.git Log errors if clicking 'Start' in the UI fails --- diff --git a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs index af91165a..586d260c 100644 --- a/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs +++ b/Questionable/Windows/QuestComponents/ActiveQuestComponent.cs @@ -10,6 +10,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin.Services; +using Microsoft.Extensions.Logging; using Questionable.Controller; using Questionable.Controller.Steps.Shared; using Questionable.Functions; @@ -33,6 +34,7 @@ internal sealed partial class ActiveQuestComponent private readonly QuestRegistry _questRegistry; private readonly PriorityWindow _priorityWindow; private readonly IChatGui _chatGui; + private readonly ILogger _logger; public ActiveQuestComponent( QuestController questController, @@ -44,7 +46,8 @@ internal sealed partial class ActiveQuestComponent Configuration configuration, QuestRegistry questRegistry, PriorityWindow priorityWindow, - IChatGui chatGui) + IChatGui chatGui, + ILogger logger) { _questController = questController; _movementController = movementController; @@ -56,6 +59,7 @@ internal sealed partial class ActiveQuestComponent _questRegistry = questRegistry; _priorityWindow = priorityWindow; _chatGui = chatGui; + _logger = logger; } public event EventHandler? Reload; @@ -115,6 +119,7 @@ internal sealed partial class ActiveQuestComponent catch (Exception e) { ImGui.TextColored(ImGuiColors.DalamudRed, e.ToString()); + _logger.LogError(e, "Could not handle active quest buttons"); } DrawSimulationControls();