aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-03-01 21:51:05 +1100
committerGitHub <noreply@github.com>2024-03-01 11:51:05 +0100
commita0b81d3592883225988e058b7de87d33fa2dddf3 (patch)
tree14ae161cfa4104cc6e4085d0a341e27740decb97 /src/main/java/at/hannibal2/skyhanni/features/garden
parent8e9109d3b190f5451793fe79929ac89b3876c4ff (diff)
downloadskyhanni-a0b81d3592883225988e058b7de87d33fa2dddf3.tar.gz
skyhanni-a0b81d3592883225988e058b7de87d33fa2dddf3.tar.bz2
skyhanni-a0b81d3592883225988e058b7de87d33fa2dddf3.zip
Replaced e.printStackTrace() with ErrorManager. #1065
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt2
4 files changed, 5 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
index e7b1679cd..eaa7f87cf 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
@@ -431,7 +431,6 @@ class FarmingWeightDisplay {
"url" to url,
"apiResponse" to apiResponse
)
- error()
}
return -1
}
@@ -470,13 +469,10 @@ class FarmingWeightDisplay {
ErrorManager.logErrorWithData(
e, "Error loading user farming weight",
"url" to url,
- "apiResponse" to apiResponse
+ "apiResponse" to apiResponse,
+ "localProfile" to localProfile
)
}
- error()
- }
-
- private fun error() {
apiError = true
ErrorManager.skyHanniError(
"Loading the farming weight data from elitebot.dev failed!\n"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
index 0ac715598..eec532ed1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
@@ -116,7 +116,7 @@ object GardenCropMilestoneDisplay {
}
cultivatingData[crop] = counter
} catch (e: Throwable) {
- ErrorManager.logError(e, "Updating crop counter by reading farming tool nbt data.")
+ ErrorManager.logErrorWithData(e, "Updating crop counter by reading farming tool nbt data.")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index 1274bf2e8..4b74271e4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -170,7 +170,7 @@ object GardenVisitorDropStatistics {
)
} else {
addAsSingletonList("§c?")
- ErrorManager.logError(
+ ErrorManager.logErrorWithData(
RuntimeException("visitorRarities is empty, maybe visitor refusing was the cause?"),
"Error rendering visitor drop statistics"
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
index c631165d3..09e02c94f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
@@ -70,7 +70,7 @@ class GardenVisitorTimer {
try {
updateVisitorDisplay()
} catch (error: Throwable) {
- ErrorManager.logError(error, "Encountered an error when updating visitor display")
+ ErrorManager.logErrorWithData(error, "Encountered an error when updating visitor display")
}
try {
GardenVisitorDropStatistics.saveAndUpdate()