diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-28 14:22:41 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-04-28 14:22:41 +0200 |
commit | 114963430eb0ef5519e7ec073a18eef0bc264237 (patch) | |
tree | ac80c36b425a87c851c1e94385d89e7df37125bf /src/dotty/tools/dotc/Run.scala | |
parent | 25b7a16700120910dee828d8e745df6400ba01d0 (diff) | |
download | dotty-114963430eb0ef5519e7ec073a18eef0bc264237.tar.gz dotty-114963430eb0ef5519e7ec073a18eef0bc264237.tar.bz2 dotty-114963430eb0ef5519e7ec073a18eef0bc264237.zip |
Display compiled files in case of exception
This is useful for reproducing a problem. It tells us in particular in what order
fiels were compiled.
Diffstat (limited to 'src/dotty/tools/dotc/Run.scala')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index af9c878f0..3d4cd988e 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -10,6 +10,7 @@ import reporting.Reporter import transform.TreeChecker import java.io.{BufferedWriter, OutputStreamWriter} import scala.reflect.io.VirtualFile +import scala.util.control.NonFatal class Run(comp: Compiler)(implicit ctx: Context) { @@ -27,9 +28,13 @@ class Run(comp: Compiler)(implicit ctx: Context) { } } - def compile(fileNames: List[String]): Unit = { + def compile(fileNames: List[String]): Unit = try { val sources = fileNames map getSource compileSources(sources) + } catch { + case NonFatal(ex) => + println(s"exception occurred while compiling $units%, %") + throw ex } /** TODO: There's a fundamental design problem here: We assmble phases using `squash` |