[hibernate-commits] Hibernate SVN: r14619 - core/trunk/core/src/main/java/org/hibernate/event.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu May 1 16:34:19 EDT 2008


Author: epbernard
Date: 2008-05-01 16:34:18 -0400 (Thu, 01 May 2008)
New Revision: 14619

Modified:
   core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java
Log:
HHH-3260 Wrapping listener exceptions into an AssertionFailure is not good. Replacing with HibernateException

Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java	2008-05-01 20:24:01 UTC (rev 14618)
+++ core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java	2008-05-01 20:34:18 UTC (rev 14619)
@@ -31,6 +31,7 @@
 
 import org.hibernate.AssertionFailure;
 import org.hibernate.MappingException;
+import org.hibernate.HibernateException;
 import org.hibernate.cfg.Configuration;
 import org.hibernate.event.def.DefaultAutoFlushEventListener;
 import org.hibernate.event.def.DefaultDeleteEventListener;
@@ -172,7 +173,7 @@
 				}
 			}
 			catch ( Exception e ) {
-				throw new AssertionFailure( "could not process listeners", e );
+				throw new HibernateException( "could not process listeners", e );
 			}
 		}
 	}
@@ -196,7 +197,7 @@
 			);
 		}
 		catch ( Exception e ) {
-			throw new AssertionFailure("could not init listeners");
+			throw new HibernateException("could not init listeners", e);
 		}
 	}
 
@@ -213,7 +214,7 @@
 			);
 		}
 		catch ( Exception e ) {
-			throw new AssertionFailure("could not init listeners");
+			throw new HibernateException("could not destruct listeners", e);
 		}
 	}
 




More information about the hibernate-commits mailing list