summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/ReificationSupport.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-14 22:55:29 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-15 09:32:27 +0100
commit99b32bf47e356603ac7c0171b55eaef055c6b672 (patch)
tree88d02ea6d81538581c5c63f0e59e825fd7bc05e8 /src/reflect/scala/reflect/internal/ReificationSupport.scala
parent88fd9b91c9b468d983bff795869753e6b9c53365 (diff)
downloadscala-99b32bf47e356603ac7c0171b55eaef055c6b672.tar.gz
scala-99b32bf47e356603ac7c0171b55eaef055c6b672.tar.bz2
scala-99b32bf47e356603ac7c0171b55eaef055c6b672.zip
staticXXX now throw ScalaReflectionException
Previously this was scala.reflect.internal.MissingRequirementError, but that's not good enough for the public API.
Diffstat (limited to 'src/reflect/scala/reflect/internal/ReificationSupport.scala')
-rw-r--r--src/reflect/scala/reflect/internal/ReificationSupport.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/internal/ReificationSupport.scala b/src/reflect/scala/reflect/internal/ReificationSupport.scala
index 653beb4c2f..6a91109faf 100644
--- a/src/reflect/scala/reflect/internal/ReificationSupport.scala
+++ b/src/reflect/scala/reflect/internal/ReificationSupport.scala
@@ -23,14 +23,15 @@ trait ReificationSupport { self: SymbolTable =>
val result = owner.info decl name
if (result ne NoSymbol) result
else
- mirrorThatLoaded(owner).missingHook(owner, name) orElse
- MissingRequirementError.notFound("%s %s in %s".format(if (name.isTermName) "term" else "type", name, owner.fullName))
+ mirrorThatLoaded(owner).missingHook(owner, name) orElse {
+ throw new ScalaReflectionException("%s %s in %s not found".format(if (name.isTermName) "term" else "type", name, owner.fullName))
+ }
}
def selectOverloadedMethod(owner: Symbol, name: String, index: Int): MethodSymbol = {
val result = owner.info.decl(newTermName(name)).alternatives(index)
if (result ne NoSymbol) result.asMethod
- else MissingRequirementError.notFound("overloaded method %s #%d in %s".format(name, index, owner.fullName))
+ else throw new ScalaReflectionException("overloaded method %s #%d in %s not found".format(name, index, owner.fullName))
}
def newFreeTerm(name: String, value: => Any, flags: Long = 0L, origin: String = null): FreeTermSymbol =