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
,java.io.Serializable
- Direct Known Subclasses:
DBInitException
,FatalDBException
public class DBOpException extends java.lang.IllegalStateException implements ExceptionWithContext
Runtime exception for wrapping database errors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DBOpException(java.lang.String message)
DBOpException(java.lang.String message, java.lang.Throwable cause)
DBOpException(java.lang.String message, java.lang.Throwable cause, ErrorContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DBOpException
forCause(java.lang.String sql, java.sql.SQLException e)
java.util.Optional<ErrorContext>
getContext()
-
-
-
Constructor Detail
-
DBOpException
public DBOpException(java.lang.String message)
-
DBOpException
public DBOpException(java.lang.String message, java.lang.Throwable cause)
-
DBOpException
public DBOpException(java.lang.String message, java.lang.Throwable cause, ErrorContext context)
-
-
Method Detail
-
forCause
public static DBOpException forCause(java.lang.String sql, java.sql.SQLException e)
-
getContext
public java.util.Optional<ErrorContext> getContext()
- Specified by:
getContext
in interfaceExceptionWithContext
-
-