aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-28 02:15:02 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-28 02:15:02 +0200
commit0424ab982ad0cacbec1e27fe7a9ac5e92caa4017 (patch)
tree3a631d428e83f5487583ca8eea9f281dddb8dcc9 /src/main/java
parent804b5a55917c853e394a0c24fbb0cd22116994ce (diff)
downloadskyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.tar.gz
skyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.tar.bz2
skyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.zip
Hopefully stop infinite recurring causes in error messages.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
index 0e785a054..c8cbf6a30 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
@@ -116,6 +116,11 @@ private fun Throwable.getCustomStackTrace(full: Boolean, parent: List<String> =
}
}
+ if (this === cause) {
+ add("Infinite recurring causes")
+ return@buildList
+ }
+
cause?.let {
addAll(it.getCustomStackTrace(full, this))
}