diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-01-25 14:15:53 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-01-25 14:19:06 +0100 |
commit | 3c88d6f44a5c08bb003cd8458bfb5a84d3b56c50 (patch) | |
tree | 4fccfc3ca56b6157484d8bc205ddfded47f2d8a3 /src/compiler/scala/tools/ant/sabbus/ScalacFork.scala | |
parent | de2b0c68785afc0f801fbe8d2750366e90c9fa70 (diff) | |
download | scala-3c88d6f44a5c08bb003cd8458bfb5a84d3b56c50.tar.gz scala-3c88d6f44a5c08bb003cd8458bfb5a84d3b56c50.tar.bz2 scala-3c88d6f44a5c08bb003cd8458bfb5a84d3b56c50.zip |
Scalac fork no longer dumps stacktraces on compilation errors
Current behavior of scalacfork task is to fail the build when there are
compilation errors reported by scalac fork. So far, so good.
However, this functionality is implemented by throwing sys.error, which
makes ant dump the entire stacktrace. This is annoying, since it almost
certainly scrolls the screen away of the error (hello, dear 1366x768)
and buries it under a meaningless stacktrace.
Surprisingly, there is a very simple fix that remedies the situation.
Credit goes to @bakoyaro from SO: http://bit.ly/xdR306
Diffstat (limited to 'src/compiler/scala/tools/ant/sabbus/ScalacFork.scala')
-rw-r--r-- | src/compiler/scala/tools/ant/sabbus/ScalacFork.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala index a39de64c5a..5199e273d7 100644 --- a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala +++ b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala @@ -13,6 +13,7 @@ import java.io.{ File, FileWriter } import org.apache.tools.ant.Project import org.apache.tools.ant.taskdefs.Java import org.apache.tools.ant.util.{ GlobPatternMapper, SourceFileScanner } +import org.apache.tools.ant.BuildException import scala.tools.nsc.io import scala.tools.nsc.util.ScalaClassLoader @@ -150,7 +151,7 @@ class ScalacFork extends ScalaMatchingTask with ScalacShared with TaskArgs { val res = execWithArgFiles(java, paths) if (failOnError && res != 0) - sys.error("Compilation failed because of an internal compiler error;"+ + throw new BuildException("Compilation failed because of an internal compiler error;"+ " see the error output for details.") } } |