From 8f3aaa9b5a118ab0f07af966e135cd824ec7c8dc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:20:58 +0100 Subject: better error handling when a unknown crimson isle quest is detected. --- .../nether/reputationhelper/dailyquest/QuestLoader.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt index 47a8716fd..52ef15b5c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson.ReputationQuest import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.DojoQuest import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.FetchQuest @@ -12,10 +13,10 @@ import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.Q import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.RescueMissionQuest import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.TrophyFishQuest import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.UnknownQuest +import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.TabListData -import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson.ReputationQuest class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { @@ -122,7 +123,16 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { "DOJO" -> return DojoQuest(questName, location, displayItem, dojoGoal, state) } } - LorenzUtils.error("Unknown Crimson Isle quest: '$name'") + ErrorManager.logErrorStateWithData( + "Unknown Crimson Isle quest: '$name'", + "Unknown quest detected", + "name" to name, + "questName" to questName, + "dojoGoal" to dojoGoal, + "state" to state, + "needAmount" to needAmount, + "tablist" to TabListData.getTabList(), + ) return UnknownQuest(name) } -- cgit