summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/Trees.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-10-31 14:56:56 +0000
committerMartin Odersky <odersky@gmail.com>2011-10-31 14:56:56 +0000
commit62b01828347087f071c70ac191372a357c4fc787 (patch)
treeab22b8dc462557d481851b56c07232c8225997e5 /src/compiler/scala/tools/nsc/ast/Trees.scala
parent1f3fe09a786b389adcc1425cfd166bc6c3e361b0 (diff)
downloadscala-62b01828347087f071c70ac191372a357c4fc787.tar.gz
scala-62b01828347087f071c70ac191372a357c4fc787.tar.bz2
scala-62b01828347087f071c70ac191372a357c4fc787.zip
Code to locate currently transformed unit in ca...
Code to locate currently transformed unit in case of crashes. Review by extempore.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/Trees.scala')
-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 {