handling abnormal termination of the compiler
This commit is contained in:
@@ -147,14 +147,6 @@ public class JetCompiler implements TranslatingCompiler {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
StringBuilder stderr = null;
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
super.processTerminated(event);
|
||||
if(stderr != null) {
|
||||
compileContext.addMessage(ERROR, "stderr output:\r\n" + stderr.toString(), "", -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
String text = event.getText();
|
||||
@@ -199,6 +191,10 @@ public class JetCompiler implements TranslatingCompiler {
|
||||
if (event.getExitCode() != 0) {
|
||||
compileContext.addMessage(ERROR, "Compiler terminated with exit code: " + event.getExitCode(), "", -1, -1);
|
||||
}
|
||||
// By alex.tkachman:
|
||||
if(stderr != null) {
|
||||
compileContext.addMessage(ERROR, "stderr output:\r\n" + stderr.toString(), "", -1, -1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user