From ddc629f66b629a077f909a9e3529505aa6834c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp=20=28TWiStErRob=29?= Date: Thu, 3 Nov 2022 12:21:48 +0000 Subject: [PATCH] Investigate Kotlin/kotlin-script-examples#21 --- kotlin/basic-script-hello-world/Main.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kotlin/basic-script-hello-world/Main.kt b/kotlin/basic-script-hello-world/Main.kt index 46be9fb..8a58e1d 100644 --- a/kotlin/basic-script-hello-world/Main.kt +++ b/kotlin/basic-script-hello-world/Main.kt @@ -25,7 +25,8 @@ fun main(args: Array) { results.reports.forEach { if (it.severity > ScriptDiagnostic.Severity.DEBUG) { - println(" : ${it.message}" + if (it.exception == null) "" else ": ${it.exception}") + val ex = it.exception + println(" : ${it.message}" + if (ex == null) "" else "\n${ex.stackTraceToString()}") } } }