HHH-3260 Wrapping listener exceptions into an AssertionFailure is not good. Replacing with HibernateException

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14619 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2008-05-01 20:34:18 +00:00
parent 957704b242
commit df9816c570

View File

@ -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 @@ private void processListeners(ListenerProcesser processer) {
}
}
catch ( Exception e ) {
throw new AssertionFailure( "could not process listeners", e );
throw new HibernateException( "could not process listeners", e );
}
}
}
@ -196,7 +197,7 @@ public void processListener(Object listener) {
);
}
catch ( Exception e ) {
throw new AssertionFailure("could not init listeners");
throw new HibernateException("could not init listeners", e);
}
}
@ -213,7 +214,7 @@ public void processListener(Object listener) {
);
}
catch ( Exception e ) {
throw new AssertionFailure("could not init listeners");
throw new HibernateException("could not destruct listeners", e);
}
}