mirror of https://github.com/apache/openjpa.git
Improved error messages
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@551845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f34e22efe4
commit
5a23d0455d
|
@ -248,6 +248,10 @@ public class MethodStoreQuery
|
|||
}
|
||||
if (!Modifier.isStatic(meth.getModifiers()))
|
||||
throw new UserException(_loc.get("method-not-static", meth));
|
||||
if (!ResultObjectProvider.class.isAssignableFrom(
|
||||
meth.getReturnType()))
|
||||
throw new UserException(_loc.get("method-return-type-invalid",
|
||||
meth, meth.getReturnType()));
|
||||
_meth = meth;
|
||||
}
|
||||
|
||||
|
|
|
@ -300,6 +300,9 @@ bad-method-class: You set the method name of this openjpa.MethodQL query to \
|
|||
qualify the class name or to import its package into this query if the \
|
||||
class is not in the query candidate class'' package.
|
||||
method-not-static: Method "{0}" named in the MethodQL query must be static.
|
||||
method-return-type-invalid: Method "{0}" named in the MethodQL query must \
|
||||
have a return type that is assignable from ResultObjectProvider. Return \
|
||||
type is: {1}.
|
||||
no-method: You must set the query filter to the name of the method to execute \
|
||||
for this MethodQL query instance.
|
||||
method-error: There was an error invoking method "{0}" with arguments "{1}".
|
||||
|
|
Loading…
Reference in New Issue