Log the stacktraces of errors when rendering elements in debug mode

This commit is contained in:
Username404-59 2021-04-29 12:32:47 +02:00
parent 61ccb4ae62
commit ab0b6e66c8
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 0 deletions

View File

@ -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
}