[#2395] Close resources on exception in AbstractSQLQuery

This commit is contained in:
Kochkurov 2020-12-07 02:43:11 +01:00 committed by Jan-Willem Gmelig Meyling
parent e718b46a97
commit 15c2a9e496

View File

@ -410,6 +410,8 @@ public abstract class AbstractSQLQuery<T, Q extends AbstractSQLQuery<T, Q>> exte
throw configuration.translate(queryString, constants, e);
} catch (RuntimeException e) {
logger.error("Caught " + e.getClass().getName() + " for " + queryString);
onException(context, e);
endContext(context);
throw e;
} finally {
reset();