From 5bff3ac927251e34e80f4656f6f9ce4afeff0031 Mon Sep 17 00:00:00 2001 From: Natalia Selezneva Date: Thu, 30 May 2019 09:29:52 +0300 Subject: [PATCH] Report errors from REPL to Scratch Console --- .../kotlin/idea/scratch/repl/KtScratchReplExecutor.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/scratch/repl/KtScratchReplExecutor.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/scratch/repl/KtScratchReplExecutor.kt index 33cfff50444..de84082bb04 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/scratch/repl/KtScratchReplExecutor.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/scratch/repl/KtScratchReplExecutor.kt @@ -108,8 +108,9 @@ class KtScratchReplExecutor(file: ScratchFile) : ScratchExecutor(file) { override fun notifyTextAvailable(text: String, outputType: Key<*>) { if (text.startsWith("warning: classpath entry points to a non-existent location")) return - if (outputType == ProcessOutputTypes.STDOUT) { - handleReplMessage(text) + when (outputType) { + ProcessOutputTypes.STDOUT -> handleReplMessage(text) + ProcessOutputTypes.STDERR -> errorOccurs(text) } }