aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-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")
+ }
}
}
}