Class DBOpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.djrapitops.plan.exceptions.database.DBOpException
- All Implemented Interfaces:
ExceptionWithContext
,Serializable
- Direct Known Subclasses:
DBClosedException
,DBInitException
,FatalDBException
Runtime exception for wrapping database errors.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDBOpException
(String message) DBOpException
(String message, Throwable cause) DBOpException
(String message, Throwable cause, ErrorContext context) -
Method Summary
Modifier and TypeMethodDescriptionstatic DBOpException
forCause
(String sql, SQLException e) boolean
boolean
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
CONSTRAINT_VIOLATION
- See Also:
-
DUPLICATE_KEY
- See Also:
-
-
Constructor Details
-
DBOpException
-
DBOpException
-
DBOpException
-
-
Method Details
-
forCause
-
getContext
- Specified by:
getContext
in interfaceExceptionWithContext
-
isUserIdConstraintViolation
public boolean isUserIdConstraintViolation() -
isDuplicateKeyViolation
public boolean isDuplicateKeyViolation()
-