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)
This commit is contained in:
Alexander Udalov
2014-07-10 00:35:56 +04:00
parent 5003a2f570
commit cb80f95cab
3 changed files with 1 additions and 7 deletions
@@ -210,11 +210,7 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
@NotNull @NotNull
public static ExitCode doMainNoExit(@NotNull CLICompiler compiler, @NotNull String[] args) { public static ExitCode doMainNoExit(@NotNull CLICompiler compiler, @NotNull String[] args) {
try { try {
ExitCode rc = compiler.exec(System.err, args); return compiler.exec(System.err, args);
if (rc != OK) {
System.err.println("exec() finished with " + rc + " return code");
}
return rc;
} }
catch (CompileEnvironmentException e) { catch (CompileEnvironmentException e) {
System.err.println(e.getMessage()); System.err.println(e.getMessage());
@@ -1,6 +1,5 @@
ERR: ERR:
ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a
exec() finished with COMPILATION_ERROR return code
Return code: 1 Return code: 1
@@ -1,6 +1,5 @@
ERR: ERR:
ERROR: [TestData]/test.kt: (4, 20) Expecting an element ERROR: [TestData]/test.kt: (4, 20) Expecting an element
exec() finished with COMPILATION_ERROR return code
Return code: 1 Return code: 1