From aa33b57242ee59ab98df7ad15d70aa0af790c933 Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Thu, 12 Jan 2012 20:11:44 +0100 Subject: [PATCH] Including the actual exception if an AuditStrategy can't be created --- .../hibernate/envers/configuration/AuditConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java index 895162c6f5..ef6a96ad2f 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java @@ -111,7 +111,9 @@ public class AuditConfiguration { Class auditStrategyClass = Thread.currentThread().getContextClassLoader().loadClass(auditEntCfg.getAuditStrategyName()); strategy = (AuditStrategy) auditStrategyClass.newInstance(); } catch (Exception e) { - throw new MappingException(String.format("Unable to create AuditStrategy[%s] instance." , auditEntCfg.getAuditStrategyName())); + throw new MappingException( + String.format("Unable to create AuditStrategy[%s] instance." , auditEntCfg.getAuditStrategyName()), + e); } if (strategy instanceof ValidityAuditStrategy) {