java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jooq.exception.DataAccessException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConfigurationException,DataChangedException,DataDefinitionException,DataMigrationException,DataTypeException,DetachedException,InvalidResultException,IOException,LoaderConfigurationException,MappingException,MockFileDatabaseException,ParserException,TemplatingException
The
DataAccessException is a generic RuntimeException
indicating that something went wrong while executing a SQL statement from
jOOQ. The idea behind this unchecked exception is borrowed from Spring's
JDBC's DataAccessException- Author:
- Sergey Epik - Merged into jOOQ from Spring JDBC Support, Lukas Eder
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionDataAccessException(String message)Constructor for DataAccessException.DataAccessException(String message, Throwable cause)Constructor for DataAccessException. -
Method Summary
Modifier and TypeMethodDescription<T extends Throwable>
TFind a root cause of a given type, ornullif no root cause of that type was found.sqlState()Retrieve theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause(), if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException.Decode theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause()intoSQLStateClass, if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException.Decode theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause()intoSQLStateSubclass, if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DataAccessException
Constructor for DataAccessException.- Parameters:
message- the detail message
-
DataAccessException
Constructor for DataAccessException.- Parameters:
message- the detail messagecause- the root cause (usually from using a underlying data access API such as JDBC)
-
-
Method Details
-
sqlState
Retrieve theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause(), if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException. -
sqlStateClass
Decode theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause()intoSQLStateClass, if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException. -
sqlStateSubclass
Decode theSQLException.getSQLState()orR2dbcException.getSqlState()fromThrowable.getCause()intoSQLStateSubclass, if thisDataAccessExceptionwas caused by aSQLExceptionorR2dbcException. -
getStackTrace
- Overrides:
getStackTracein classThrowable
-
getCause
Find a root cause of a given type, ornullif no root cause of that type was found.
-