diff options
author | Paul Phillips <paulp@improving.org> | 2010-12-01 00:11:31 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-12-01 00:11:31 +0000 |
commit | 46fba575f7f5bfbcbf4860deb297ec83cf99d9d0 (patch) | |
tree | 82c2c3c9f0466e870c8cc5793976412e985d1773 /src | |
parent | 1c0d571f6db723ca751eb56555053756299e04a8 (diff) | |
download | scala-46fba575f7f5bfbcbf4860deb297ec83cf99d9d0.tar.gz scala-46fba575f7f5bfbcbf4860deb297ec83cf99d9d0.tar.bz2 scala-46fba575f7f5bfbcbf4860deb297ec83cf99d9d0.zip |
Taking retronym's advice on increasing Universa...
Taking retronym's advice on increasing UniversalFn transparency. No
review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/reflect/UniversalFn.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/reflect/UniversalFn.scala b/src/compiler/scala/tools/reflect/UniversalFn.scala index 7fce4ea61c..9882b1e4bd 100644 --- a/src/compiler/scala/tools/reflect/UniversalFn.scala +++ b/src/compiler/scala/tools/reflect/UniversalFn.scala @@ -6,7 +6,7 @@ package scala.tools package reflect -import java.lang.reflect.Method +import java.lang.reflect.{ Method, InvocationTargetException } import java.{ lang => jl } /** For certain reflection tasks it is convenient to treat all methods @@ -37,7 +37,9 @@ class UniversalFn private (val closure: AnyRef, val method: Method) extends (Seq proxy.asInstanceOf[T] } - def apply(xs: Seq[AnyRef]): AnyRef = method.invoke(closure, xs: _*) + def apply(xs: Seq[AnyRef]): AnyRef = + try method.invoke(closure, xs: _*) + catch { case x: InvocationTargetException => throw x.getCause() } } object UniversalFn { |