From fa822e3ef63a7e11345dcdd2c81a1f565093a63c Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 28 Nov 2010 22:58:15 +0000 Subject: Adding some more unwrapping to unwrap. No review. --- src/compiler/scala/tools/nsc/util/Exceptional.scala | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/compiler') 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 } } -- cgit v1.2.3