Merge org.hibernate.testing.orm.ExceptionHelper into org.hibernate.internal.util.ExceptionHelper
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
575847322d
commit
42f64f1c2e
|
@ -21,6 +21,14 @@ public final class ExceptionHelper {
|
|||
ExceptionHelper.<RuntimeException>doThrow0(e);
|
||||
}
|
||||
|
||||
public static Throwable getRootCause(Throwable error) {
|
||||
Throwable toProcess = error;
|
||||
while ( toProcess.getCause() != null ) {
|
||||
toProcess = toProcess.getCause();
|
||||
}
|
||||
return toProcess;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T extends Throwable> void doThrow0(Throwable e) throws T {
|
||||
throw (T) e;
|
||||
|
|
|
@ -18,10 +18,10 @@ import jakarta.persistence.Id;
|
|||
import jakarta.persistence.Table;
|
||||
|
||||
import org.hibernate.engine.spi.SessionImplementor;
|
||||
import org.hibernate.internal.util.ExceptionHelper;
|
||||
import org.hibernate.query.Query;
|
||||
import org.hibernate.sql.ast.SqlTreeCreationException;
|
||||
|
||||
import org.hibernate.testing.orm.ExceptionHelper;
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
|
Loading…
Reference in New Issue