Package org.hibernate.testing.util
Class ExceptionUtil
- java.lang.Object
-
- org.hibernate.testing.util.ExceptionUtil
-
public class ExceptionUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Throwable
findCause(java.lang.Throwable t, java.lang.Class<? extends java.lang.Throwable> causeClass)
Get a specific cause.static ExceptionUtil
getInstance()
static boolean
isConnectionClose(java.lang.Exception e)
Was the given exception caused by a SQL connection closestatic boolean
isSqlLockTimeout(java.lang.Exception e)
Was the given exception caused by a SQL lock timeout?static java.lang.Throwable
rootCause(java.lang.Throwable t)
Get the root cause of a particularThrowable
-
-
-
Method Detail
-
getInstance
public static ExceptionUtil getInstance()
-
rootCause
public static java.lang.Throwable rootCause(java.lang.Throwable t)
Get the root cause of a particularThrowable
- Parameters:
t
- exception- Returns:
- exception root cause
-
findCause
public static java.lang.Throwable findCause(java.lang.Throwable t, java.lang.Class<? extends java.lang.Throwable> causeClass)
Get a specific cause.- Parameters:
t
- exceptioncauseClass
- cause type- Returns:
- exception root cause
-
isSqlLockTimeout
public static boolean isSqlLockTimeout(java.lang.Exception e)
Was the given exception caused by a SQL lock timeout?- Parameters:
e
- exception- Returns:
- is caused by a SQL lock timeout
-
isConnectionClose
public static boolean isConnectionClose(java.lang.Exception e)
Was the given exception caused by a SQL connection close- Parameters:
e
- exception- Returns:
- is caused by a SQL connection close
-
-