DataAccessException is a generic RuntimeException
indicating that something went wrong while executing a SQL statement from
jOOQ.
Unlike JDBC, jOOQ throws RuntimeException, knowing that
SQLException types are not recoverable.SQLIntegrityConstraintViolationException), they won't appear with
most statements.
Apart from jOOQ's own DataAccessException subtypes, which are thrown
by jOOQ's internals, most SQLException types (or
R2dbcException types) are translated and wrapped by:
DataException when jOOQ detects
SQLStateClass#C22_DATA_EXCEPTION.IntegrityConstraintViolationException when jOOQ detects
SQLStateClass#C23_INTEGRITY_CONSTRAINT_VIOLATION.DataAccessException otherwise.| Access | Constructor and Description |
|---|---|
| public | |
| public | DataAccessException(String
the detail message message, Throwable the root cause (usually from using a underlying data access
API such as JDBC) cause)Constructor for DataAccessException. |
| Modifier and Type | Method and Description |
|---|---|
| public <T extends Throwable> T | |
| public StackTraceElement[] | getStackTrace()
Overrides java. printStackTrace().
|
| public @NotNull String | sqlState()
Retrieve the |
| public @NotNull SQLStateClass | sqlStateClass()
Decode the |
| public static @NotNull SQLStateClass | |
| public static @NotNull SQLStateClass | |
| public @NotNull SQLStateSubclass | sqlStateSubclass()
Decode the |
| DataAccessException | back to summary |
|---|---|
| public DataAccessException(String message) Constructor for DataAccessException.
| |
| DataAccessException | back to summary |
|---|---|
| public DataAccessException(String message, Throwable cause) Constructor for DataAccessException. | |
| getCause | back to summary |
|---|---|
| public <T extends Throwable> T getCause(Class<? extends T> type) Find a root cause of a given type, or
| |
| getStackTrace | back to summary |
|---|---|
| public StackTraceElement[] getStackTrace() Overrides java. Doc from java. Provides programmatic access to the stack trace information printed by
Some virtual machines may, under some circumstances, omit one
or more stack frames from the stack trace. In the extreme case,
a virtual machine that has no stack trace information concerning
this throwable is permitted to return a zero-length array from this
method. Generally speaking, the array returned by this method will
contain one element for every frame that would be printed by
| |
| sqlState | back to summary |
|---|---|
| public @NotNull String sqlState() Retrieve the
| |
| sqlStateClass | back to summary |
|---|---|
| public @NotNull SQLStateClass sqlStateClass() Decode the
| |
| sqlStateClass | back to summary |
|---|---|
| public static @NotNull SQLStateClass sqlStateClass(SQLException e) Decode the
| |
| sqlStateClass | back to summary |
|---|---|
| public static @NotNull SQLStateClass sqlStateClass(R2dbcException e) Decode the
| |
| sqlStateSubclass | back to summary |
|---|---|
| public @NotNull SQLStateSubclass sqlStateSubclass() Decode the
| |