summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-11-28 22:58:15 +0000
committerPaul Phillips <paulp@improving.org>2010-11-28 22:58:15 +0000
commitfa822e3ef63a7e11345dcdd2c81a1f565093a63c (patch)
tree168b19b1ffb24bac1708698c82e4728a0676404e /src/compiler
parentb810d8c4012d1b09fa95181790722b60967be3fc (diff)
downloadscala-fa822e3ef63a7e11345dcdd2c81a1f565093a63c.tar.gz
scala-fa822e3ef63a7e11345dcdd2c81a1f565093a63c.tar.bz2
scala-fa822e3ef63a7e11345dcdd2c81a1f565093a63c.zip
Adding some more unwrapping to unwrap. No review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/util/Exceptional.scala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/util/Exceptional.scala b/src/compiler/scala/tools/nsc/util/Exceptional.scala
index d0c04ae4d9..54ef3606f1 100644
--- a/src/compiler/scala/tools/nsc/util/Exceptional.scala
+++ b/src/compiler/scala/tools/nsc/util/Exceptional.scala
@@ -1,6 +1,7 @@
package scala.tools.nsc
package util
+import java.util.concurrent.ExecutionException
import java.lang.reflect.{ InvocationTargetException, UndeclaredThrowableException }
import io.{ Sources, Fileish }
import scala.tools.util.StringOps._
@@ -117,7 +118,13 @@ object Exceptional {
case ex => x :: causes(ex)
}
def unwrap(x: Throwable): Throwable = x match {
- case _: InvocationTargetException | _: ExceptionInInitializerError | _: UndeclaredThrowableException if x.getCause != null => unwrap(x.getCause)
- case _ => x
+ case _: InvocationTargetException |
+ _: ExceptionInInitializerError |
+ _: UndeclaredThrowableException |
+ _: ExecutionException
+ if x.getCause != null =>
+ unwrap(x.getCause)
+
+ case _ => x
}
}