From 5c8169ba7cd81b5ab9ac282bd5c596f25c7d7f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 15 Oct 2019 15:05:52 +0200 Subject: [PATCH] HHH-13666 Re-use the wrapped exception's message upon beforeTransactionCompletion/afterTransactionCompletion failure For convenience. --- .../src/main/java/org/hibernate/engine/spi/ActionQueue.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java index 66bdaf380e..6272656aff 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java @@ -957,7 +957,7 @@ public class ActionQueue { throw he; } catch (Exception e) { - throw new HibernateException( "Unable to perform beforeTransactionCompletion callback", e ); + throw new HibernateException( "Unable to perform beforeTransactionCompletion callback: " + e.getMessage(), e ); } } } @@ -987,7 +987,7 @@ public class ActionQueue { // continue loop } catch (Exception e) { - throw new HibernateException( "Unable to perform afterTransactionCompletion callback", e ); + throw new HibernateException( "Unable to perform afterTransactionCompletion callback: " + e.getMessage(), e ); } }