diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/replUtil.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/replUtil.kt index 928e588814d..138f9ebc09d 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/replUtil.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/replUtil.kt @@ -40,7 +40,7 @@ fun renderReplStackTrace(cause: Throwable, startFromMethodName: String): String @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UsePropertyAccessSyntax") (cause as java.lang.Throwable).setStackTrace(resultingTrace.toTypedArray()) - return Throwables.getStackTraceAsString(cause) + return Throwables.getStackTraceAsString(cause).trimEnd() } internal fun ClassLoader.listAllUrlsAsFiles(): List { diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.kt index 4863432c81b..afa5db79c48 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.kt @@ -52,7 +52,7 @@ class ReplInterpreter( } override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageLocation?) { - val msg = messageRenderer.render(severity, message, location) + val msg = messageRenderer.render(severity, message, location).trimEnd() with (replConfiguration.writer) { when (severity) { CompilerMessageSeverity.EXCEPTION -> sendInternalErrorReport(msg)