From ab0b6e66c8a98b7e0d4f2423fa19c5f0687197e7 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Thu, 29 Apr 2021 12:32:47 +0200 Subject: [PATCH] Log the stacktraces of errors when rendering elements in debug mode --- common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt index 9310315..f364589 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt @@ -22,6 +22,7 @@ abstract class Element( } catch (t: Throwable) { with(Snowy.logs) { error("An element from snowy threw an error: \n\t$t") + debug("\t${t.stackTraceToString()}") warn("Rendering of snowy UI elements will now be disabled to avoid further errors.") caughtError = true }