diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/JavaConstantNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/JavaConstantNode.java index 82fb6ba00a..4d2af46998 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/JavaConstantNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/JavaConstantNode.java @@ -84,7 +84,7 @@ public class JavaConstantNode extends Node implements ExpectedTypeAwareNode, Ses Dialect dialect = factory.getDialect(); return literalType.objectToSQLString( constantValue, dialect ); } - catch ( Throwable t ) { + catch ( Exception t ) { throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + constantExpression, t ); } }