File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
hibernate-entitymanager/src/main/java/org/hibernate/jpa/spi Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -730,7 +730,12 @@ protected CriteriaCompiler criteriaCompiler() {
730
730
@ Override
731
731
public <T > TypedQuery <T > createQuery (CriteriaQuery <T > criteriaQuery ) {
732
732
checkOpen ();
733
- return (TypedQuery <T >) criteriaCompiler ().compile ( (CompilableCriteria ) criteriaQuery );
733
+ try {
734
+ return (TypedQuery <T >) criteriaCompiler ().compile ( (CompilableCriteria ) criteriaQuery );
735
+ }
736
+ catch ( RuntimeException e ) {
737
+ throw convert ( e );
738
+ }
734
739
}
735
740
736
741
@ Override
@@ -1280,6 +1285,7 @@ public HibernateEntityManagerFactory getFactory() {
1280
1285
1281
1286
@ Override
1282
1287
public CriteriaBuilder getCriteriaBuilder () {
1288
+
1283
1289
checkOpen ();
1284
1290
return getEntityManagerFactory ().getCriteriaBuilder ();
1285
1291
}
You can’t perform that action at this time.
0 commit comments