diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 22:55:29 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 09:32:27 +0100 |
commit | 99b32bf47e356603ac7c0171b55eaef055c6b672 (patch) | |
tree | 88d02ea6d81538581c5c63f0e59e825fd7bc05e8 /src/reflect/scala/reflect/internal/ReificationSupport.scala | |
parent | 88fd9b91c9b468d983bff795869753e6b9c53365 (diff) | |
download | scala-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.scala | 7 |
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 = |