summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index 86aca26ba6..9668debbbb 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -201,7 +201,14 @@ trait Trees extends reflect.internal.Trees { self: Global =>
}
class Transformer extends super.Transformer {
- def transformUnit(unit: CompilationUnit) { unit.body = transform(unit.body) }
+ def transformUnit(unit: CompilationUnit) {
+ try unit.body = transform(unit.body)
+ catch {
+ case ex: Exception =>
+ println("unhandled exception while transforming "+unit)
+ throw ex
+ }
+ }
}
override protected def xtransform(transformer: super.Transformer, tree: Tree): Tree = tree match {