diff options
author | Martin Odersky <odersky@gmail.com> | 2011-10-31 14:56:56 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-10-31 14:56:56 +0000 |
commit | 62b01828347087f071c70ac191372a357c4fc787 (patch) | |
tree | ab22b8dc462557d481851b56c07232c8225997e5 /src/compiler/scala/tools/nsc/ast | |
parent | 1f3fe09a786b389adcc1425cfd166bc6c3e361b0 (diff) | |
download | scala-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')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/Trees.scala | 9 |
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 { |