From 7bccc4ba4b36453a4692acca351b7ef9c2acb8e9 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 10 Aug 2025 20:23:16 +0200 Subject: [PATCH] Log errors if clicking 'Start' in the UI fails --- .../Windows/QuestComponents/ActiveQuestComponent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); -- 2.20.1