Package io.hypersistence.utils.common
Interface ExceptionUtil
public interface ExceptionUtil
- Author:
- Vlad Mihalcea
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic boolean
isCausedBy
(Throwable e, Class<? extends Throwable> exceptionType) Is the given throwable caused by the following exception type?static boolean
Was the given exception caused by a SQL connection closestatic boolean
Is the given throwable caused by a database lock timeout?static boolean
Is the given throwable caused by a database MVCC anomaly detection?static <T extends Throwable>
TGet the root cause of a particularThrowable
-
Field Details
-
LOCK_TIMEOUT_EXCEPTIONS
-
-
Method Details
-
rootCause
Get the root cause of a particularThrowable
- Parameters:
t
- exception- Returns:
- exception root cause
-
isLockTimeout
Is the given throwable caused by a database lock timeout?- Parameters:
e
- exception- Returns:
- is caused by a database lock timeout
-
isCausedBy
Is the given throwable caused by the following exception type?- Parameters:
e
- exceptionexceptionType
- exception type- Returns:
- is caused by the given exception type
-
isMVCCAnomalyDetection
Is the given throwable caused by a database MVCC anomaly detection?- Parameters:
e
- exception- Returns:
- is caused by a database lock MVCC anomaly detection
-
isConnectionClose
Was the given exception caused by a SQL connection close- Parameters:
e
- exception- Returns:
- is caused by a SQL connection close
-