From 7683854908da7904490c7393386be8271b57817c Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 7 Feb 2012 12:52:38 +0400 Subject: [PATCH] handling abnormal termination of the compiler --- .../org/jetbrains/jet/plugin/compiler/JetCompiler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java b/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java index c2187017966..b418dd7410d 100644 --- a/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java +++ b/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java @@ -130,7 +130,7 @@ public class JetCompiler implements TranslatingCompiler { } params.getVMParametersList().addParametersString("-Djava.awt.headless=true -Xmx512m"); - //params.getVMParametersList().addParametersString("-agentlib:yjpagent=sampling"); +// params.getVMParametersList().addParametersString("-agentlib:yjpagent=sampling"); Sdk sdk = params.getJdk(); @@ -193,6 +193,13 @@ public class JetCompiler implements TranslatingCompiler { compileContext.addMessage(INFORMATION, text, "", -1, -1); } } + + @Override + public void processTerminated(ProcessEvent event) { + if (event.getExitCode() != 0) { + compileContext.addMessage(ERROR, "Compiler terminated with exit code: " + event.getExitCode(), "", -1, -1); + } + } }); processHandler.startNotify();