aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-15 22:00:14 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-15 22:00:14 +0200
commit6ad2ea688bd3af0305ebec63f46e09c68491736b (patch)
tree2567b404d9541e35d5b44379f4b3fad6c933cbbe
parent315414c3f6204a04a40d25262b0da187023f8cb7 (diff)
downloadSkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.tar.gz
SkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.tar.bz2
SkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.zip
fixed ArrayIndexOutOfBoundsException
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt
index 4ac0a78e8..b922e524c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt
@@ -180,8 +180,12 @@ class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter {
val cause = thrown.cause
if (cause != null) {
debug("throw cause: '$cause'")
- element = cause.stackTrace[0]
- debug("thrown cause first element: '$element'")
+ if (cause.stackTrace.isNotEmpty()) {
+ element = cause.stackTrace[0]
+ debug("thrown cause first element: '$element'")
+ } else {
+ debug("thrown cause has no elements")
+ }
}
}
}