@@ -83,12 +83,12 @@ class Interpreter(implicit ctx: Context) {
8383 val paramClasses = paramsSig(fn.symbol)
8484 val interpretedArgs = args.map(arg => interpretTreeImpl(arg, env))
8585 val constructor = getConstructor(clazz, paramClasses)
86- interpreted (constructor.newInstance(interpretedArgs : _* ))
86+ stopIfRuntimeException (constructor.newInstance(interpretedArgs : _* ))
8787
8888 case _ : RefTree if tree.symbol.isStatic =>
8989 val clazz = loadClass(tree.symbol.owner.companionModule.fullName)
9090 val method = getMethod(clazz, tree.symbol.name, Nil )
91- interpreted (method.invoke(null ))
91+ stopIfRuntimeException (method.invoke(null ))
9292
9393 case tree : Apply =>
9494 val evaluatedPrefix = if (tree.symbol.isStatic) null else interpretPrefix(tree, env)
@@ -98,7 +98,7 @@ class Interpreter(implicit ctx: Context) {
9898 val paramClasses = paramsSig(tree.symbol)
9999 val interpretedArgs = interpretArgs(tree, env)
100100 val method = getMethod(clazz, tree.symbol.name, paramClasses)
101- interpreted (method.invoke(evaluatedPrefix, interpretedArgs : _* ))
101+ stopIfRuntimeException (method.invoke(evaluatedPrefix, interpretedArgs : _* ))
102102
103103 case tree : Ident if env.contains(tree.symbol) =>
104104 env(tree.symbol)
@@ -124,7 +124,7 @@ class Interpreter(implicit ctx: Context) {
124124 if (clazz.getCanonicalName != tree.symbol.owner.showFullName) value // Already unboxed
125125 else {
126126 val method = getMethod(clazz, name, Nil )
127- interpreted (method.invoke(value))
127+ stopIfRuntimeException (method.invoke(value))
128128 }
129129
130130 case SeqLiteral (elems, _) =>
@@ -193,7 +193,7 @@ class Interpreter(implicit ctx: Context) {
193193 }
194194 }
195195
196- private def interpreted [T ](thunk : => T )(implicit pos : Position ): T = {
196+ private def stopIfRuntimeException [T ](thunk : => T )(implicit pos : Position ): T = {
197197 try thunk
198198 catch {
199199 case ex : RuntimeException =>
0 commit comments