From 549e712f1f82d5869087b3cdb69e7454a0fc5512 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Tue, 28 Feb 2017 00:16:53 -0500 Subject: [PATCH] HHH-11568 - Wrap antlr-parser exceptions as QueryException. --- .../org/hibernate/hql/internal/ast/QueryTranslatorImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java index bb07b51269..c5ff3a16be 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java @@ -232,6 +232,11 @@ public class QueryTranslatorImpl implements FilterTranslator { LOG.trace( "Converted antlr.ANTLRException", e ); throw new QueryException( e.getMessage(), hql ); } + catch ( IllegalArgumentException e ) { + // translate this into QueryException + LOG.trace( "Converted IllegalArgumentException", e ); + throw new QueryException( e.getMessage(), hql ); + } //only needed during compilation phase... this.enabledFilters = null;