Skip to content

Commit 549e712

Browse files
committed
HHH-11568 - Wrap antlr-parser exceptions as QueryException.
1 parent 4bd5c8a commit 549e712

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ private synchronized void doCompile(Map replacements, boolean shallow, String co
232232
LOG.trace( "Converted antlr.ANTLRException", e );
233233
throw new QueryException( e.getMessage(), hql );
234234
}
235+
catch ( IllegalArgumentException e ) {
236+
// translate this into QueryException
237+
LOG.trace( "Converted IllegalArgumentException", e );
238+
throw new QueryException( e.getMessage(), hql );
239+
}
235240

236241
//only needed during compilation phase...
237242
this.enabledFilters = null;

0 commit comments

Comments
 (0)