Skip to content

Commit

Permalink
HHH-5588
Browse files Browse the repository at this point in the history
Removing EnversExeption and using HibernateException instead.
  • Loading branch information
Hernan authored and adamw committed Jan 4, 2011
1 parent 87c5387 commit b8c4784
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 29 deletions.
4 changes: 2 additions & 2 deletions envers/src/main/java/org/hibernate/envers/AuditReader.java
Expand Up @@ -28,7 +28,7 @@
import java.util.Map;
import java.util.Set;

import org.hibernate.envers.exception.EnversException;
import org.hibernate.HibernateException;
import org.hibernate.envers.exception.NotAuditedException;
import org.hibernate.envers.exception.RevisionDoesNotExistException;
import org.hibernate.envers.query.AuditQueryCreator;
Expand Down Expand Up @@ -230,6 +230,6 @@ <T> Map<Number, T> findRevisions(Class<T> revisionEntityClass,
* not associated with this AuditReader instance.
*/
String getEntityName(Object primaryKey, Number revision, Object entity)
throws EnversException;
throws HibernateException;

}

This file was deleted.

Expand Up @@ -42,7 +42,6 @@
import org.hibernate.engine.SessionImplementor;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.exception.EnversException;
import org.hibernate.envers.exception.NotAuditedException;
import org.hibernate.envers.exception.RevisionDoesNotExistException;
import org.hibernate.envers.query.AuditEntity;
Expand Down Expand Up @@ -279,7 +278,7 @@ public boolean isEntityNameNotAudited(String entityName) {
}


public String getEntityName(Object primaryKey, Number revision ,Object entity) throws EnversException{
public String getEntityName(Object primaryKey, Number revision ,Object entity) throws HibernateException{
checkNotNull(primaryKey, "Primary key");
checkNotNull(revision, "Entity revision");
checkPositive(revision, "Entity revision");
Expand All @@ -294,8 +293,8 @@ public String getEntityName(Object primaryKey, Number revision ,Object entity) t
// it´s on envers FLC!
return firstLevelCache.getFromEntityNameCache(primaryKey, revision, entity);
} else {
throw new EnversException(
"Can´t resolve entityName for historic entity. The id, revision and entity is not on envers first level cache.");
throw new HibernateException(
"Envers can´t resolve entityName for historic entity. The id, revision and entity is not on envers first level cache.");
}
}
}

0 comments on commit b8c4784

Please sign in to comment.