src/create-file/src.main.kts [21:30]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fun runCatchingWithLogging(block: () -> Unit) = runCatching(block).onFailure { fun writeMessage(text: String, vararg attributes: Pair) = println(asString(MESSAGE, mapOf("text" to text, *attributes))) fun writeDebug(text: String) = writeMessage(text, TAGS_ATRRIBUTE to "tc:internal") fun writeError(text: String) = writeMessage(text, "status" to "ERROR") writeError("$it (Switch to 'Verbose' log level to see stacktrace)") writeDebug(it.stackTraceToString()) kotlin.system.exitProcess(1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - src/tag-build/src.main.kts [44:52]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fun runCatchingWithLogging(block: () -> Unit) = runCatching(block).onFailure { fun writeMessage(text: String, vararg attributes: Pair) = println(asString(MESSAGE, mapOf("text" to text, *attributes))) fun writeDebug(text: String) = writeMessage(text, TAGS_ATRRIBUTE to "tc:internal") fun writeError(text: String) = writeMessage(text, "status" to "ERROR") writeError("$it (Switch to 'Verbose' log level to see stacktrace)") writeDebug(it.stackTraceToString()) kotlin.system.exitProcess(1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -