diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-28 02:15:02 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-28 02:15:02 +0200 |
commit | 0424ab982ad0cacbec1e27fe7a9ac5e92caa4017 (patch) | |
tree | 3a631d428e83f5487583ca8eea9f281dddb8dcc9 /src/main/java/at/hannibal2 | |
parent | 804b5a55917c853e394a0c24fbb0cd22116994ce (diff) | |
download | skyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.tar.gz skyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.tar.bz2 skyhanni-0424ab982ad0cacbec1e27fe7a9ac5e92caa4017.zip |
Hopefully stop infinite recurring causes in error messages.
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 5 |
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)) } |