Report errors from REPL to Scratch Console

This commit is contained in:
Natalia Selezneva
2019-05-30 09:29:52 +03:00
parent a6221cf594
commit 5bff3ac927
@@ -108,8 +108,9 @@ class KtScratchReplExecutor(file: ScratchFile) : ScratchExecutor(file) {
override fun notifyTextAvailable(text: String, outputType: Key<*>) { override fun notifyTextAvailable(text: String, outputType: Key<*>) {
if (text.startsWith("warning: classpath entry points to a non-existent location")) return if (text.startsWith("warning: classpath entry points to a non-existent location")) return
if (outputType == ProcessOutputTypes.STDOUT) { when (outputType) {
handleReplMessage(text) ProcessOutputTypes.STDOUT -> handleReplMessage(text)
ProcessOutputTypes.STDERR -> errorOccurs(text)
} }
} }