I think the best fix that aligns with our current tests would be:
- Throw the QueryException internally
- createQuery() translates it to an IllegalArgumentException
Users of the API can then use:
catch ( IllegalArgumentException e ) {
if ( QueryException.class.isInstance( e.getClause() ) ) {
}
}
This keeps with 5.2 behavior but at least allows this use case to be easily be handled. |