summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-01 00:11:31 +0000
committerPaul Phillips <paulp@improving.org>2010-12-01 00:11:31 +0000
commit46fba575f7f5bfbcbf4860deb297ec83cf99d9d0 (patch)
tree82c2c3c9f0466e870c8cc5793976412e985d1773 /src
parent1c0d571f6db723ca751eb56555053756299e04a8 (diff)
downloadscala-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.scala6
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 {