From cb80f95cab520772687e762f40a3522422d719fd Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 10 Jul 2014 00:35:56 +0400 Subject: [PATCH] Don't output "exec() finished with..." error message It's useless because the result of the compiler is always evident (it outputs either diagnostics or an exception stack trace) --- .../cli/src/org/jetbrains/jet/cli/common/CLICompiler.java | 6 +----- .../testData/compilationFailed/hello.compile.expected | 1 - .../testData/syntaxErrors/test.compile.expected | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/common/CLICompiler.java b/compiler/cli/src/org/jetbrains/jet/cli/common/CLICompiler.java index e950a75bbb1..48903beb40b 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/common/CLICompiler.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/common/CLICompiler.java @@ -210,11 +210,7 @@ public abstract class CLICompiler { @NotNull public static ExitCode doMainNoExit(@NotNull CLICompiler compiler, @NotNull String[] args) { try { - ExitCode rc = compiler.exec(System.err, args); - if (rc != OK) { - System.err.println("exec() finished with " + rc + " return code"); - } - return rc; + return compiler.exec(System.err, args); } catch (CompileEnvironmentException e) { System.err.println(e.getMessage()); diff --git a/compiler/integration-tests/testData/compilationFailed/hello.compile.expected b/compiler/integration-tests/testData/compilationFailed/hello.compile.expected index dbd5f4b53fd..bced8604933 100644 --- a/compiler/integration-tests/testData/compilationFailed/hello.compile.expected +++ b/compiler/integration-tests/testData/compilationFailed/hello.compile.expected @@ -1,6 +1,5 @@ ERR: ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a -exec() finished with COMPILATION_ERROR return code Return code: 1 diff --git a/compiler/integration-tests/testData/syntaxErrors/test.compile.expected b/compiler/integration-tests/testData/syntaxErrors/test.compile.expected index 59b60ce9323..8878148bf50 100644 --- a/compiler/integration-tests/testData/syntaxErrors/test.compile.expected +++ b/compiler/integration-tests/testData/syntaxErrors/test.compile.expected @@ -1,6 +1,5 @@ ERR: ERROR: [TestData]/test.kt: (4, 20) Expecting an element -exec() finished with COMPILATION_ERROR return code Return code: 1