From b52fde59257dfb97ac218f5098d49523585b1bb4 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Tue, 26 Dec 2023 07:45:59 -0800 Subject: [PATCH] Console: Fix using the wrong object's class name for errors --- .../chattriggers/ctjs/internal/console/ConsoleHostProcess.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/chattriggers/ctjs/internal/console/ConsoleHostProcess.kt b/src/main/kotlin/com/chattriggers/ctjs/internal/console/ConsoleHostProcess.kt index b048e16b..ebf39a5d 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/internal/console/ConsoleHostProcess.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/internal/console/ConsoleHostProcess.kt @@ -143,7 +143,7 @@ object ConsoleHostProcess { fun printStackTrace(error: Throwable) { fun makeError(err: Throwable): PrintErrorMessage.Error = PrintErrorMessage.Error( - error::class.qualifiedName?.let { "$it: " } + err.message.orEmpty(), + err::class.qualifiedName?.let { "$it: " } + err.message.orEmpty(), err.stackTrace.map { StackTrace(it.fileName, it.className, it.methodName, it.lineNumber) },