summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2014-08-21 11:36:44 +0200
committerAntoine Gourlay <antoine@gourlay.fr>2014-08-25 11:34:02 +0200
commit066d1026d9b5783d3358bc4389b2371cee00ed8c (patch)
tree67501604758e8628e528234e20732aee8ba8c9d3
parent6f54b1dfede5d9b375eab029ef682e1a61da9a70 (diff)
downloadscala-066d1026d9b5783d3358bc4389b2371cee00ed8c.tar.gz
scala-066d1026d9b5783d3358bc4389b2371cee00ed8c.tar.bz2
scala-066d1026d9b5783d3358bc4389b2371cee00ed8c.zip
SI-5227 make fsc notify its client upon compiler crash
Fsc shoudln't just write to its own stderr when a major compiler crash happens, it should also send an error to the client (`scala -e` for example). Otherwise the client thinks everything went fine (silence == success) and tries to run something, crashes too, and displays only its own error, not the original one.
-rw-r--r--src/compiler/scala/tools/nsc/CompileServer.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileServer.scala b/src/compiler/scala/tools/nsc/CompileServer.scala
index 1f3a4237eb..029e1c4629 100644
--- a/src/compiler/scala/tools/nsc/CompileServer.scala
+++ b/src/compiler/scala/tools/nsc/CompileServer.scala
@@ -152,6 +152,7 @@ class StandardCompileServer extends SocketServer {
clearCompiler()
case ex: Throwable =>
warn("Compile server encountered fatal condition: " + ex)
+ reporter.error(null, "Compile server encountered fatal condition: " + ex.getMessage)
shutdown = true
throw ex
}