From 0424ab982ad0cacbec1e27fe7a9ac5e92caa4017 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 28 Oct 2023 02:15:02 +0200 Subject: Hopefully stop infinite recurring causes in error messages. --- src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/at/hannibal2') 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 = } } + if (this === cause) { + add("Infinite recurring causes") + return@buildList + } + cause?.let { addAll(it.getCustomStackTrace(full, this)) } -- cgit