aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Run.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/Run.scala')
-rw-r--r--src/dotty/tools/dotc/Run.scala7
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`