OPENJPA:365: Raise informative exception when user supplied id argument is wrong type

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@677147 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-07-16 03:59:33 +00:00
parent 6e3aca63ec
commit efdbbd7a92
1 changed files with 3 additions and 0 deletions

View File

@ -1142,6 +1142,9 @@ public class BrokerImpl
default:
throw new UserException(_loc.get("meta-unknownid", cls));
}
} catch (IllegalArgumentException iae) {
throw new UserException(_loc.get("bad-id-value", val,
val.getClass().getName(), cls)).setCause(iae);
} catch (OpenJPAException ke) {
throw ke;
} catch (ClassCastException cce) {