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:
parent
957704b242
commit
df9816c570
|
@ -31,6 +31,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
import org.hibernate.AssertionFailure;
|
||||||
import org.hibernate.MappingException;
|
import org.hibernate.MappingException;
|
||||||
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.cfg.Configuration;
|
import org.hibernate.cfg.Configuration;
|
||||||
import org.hibernate.event.def.DefaultAutoFlushEventListener;
|
import org.hibernate.event.def.DefaultAutoFlushEventListener;
|
||||||
import org.hibernate.event.def.DefaultDeleteEventListener;
|
import org.hibernate.event.def.DefaultDeleteEventListener;
|
||||||
|
@ -172,7 +173,7 @@ public class EventListeners extends Cloneable implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( Exception e ) {
|
catch ( Exception e ) {
|
||||||
throw new AssertionFailure( "could not process listeners", e );
|
throw new HibernateException( "could not process listeners", e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,7 +197,7 @@ public class EventListeners extends Cloneable implements Serializable {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch ( Exception e ) {
|
catch ( Exception e ) {
|
||||||
throw new AssertionFailure("could not init listeners");
|
throw new HibernateException("could not init listeners", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +214,7 @@ public class EventListeners extends Cloneable implements Serializable {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch ( Exception e ) {
|
catch ( Exception e ) {
|
||||||
throw new AssertionFailure("could not init listeners");
|
throw new HibernateException("could not destruct listeners", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue