diff --git a/jOOQ/src/main/java/org/jooq/exception/DataAccessException.java b/jOOQ/src/main/java/org/jooq/exception/DataAccessException.java index 0bf2d085ca..3ffcbc3139 100644 --- a/jOOQ/src/main/java/org/jooq/exception/DataAccessException.java +++ b/jOOQ/src/main/java/org/jooq/exception/DataAccessException.java @@ -40,6 +40,7 @@ package org.jooq.exception; import static org.jooq.tools.StringUtils.defaultIfNull; import java.sql.SQLException; +import java.sql.SQLIntegrityConstraintViolationException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -49,8 +50,26 @@ import io.r2dbc.spi.R2dbcException; /** * The DataAccessException is a generic {@link 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 + * jOOQ. + *

+ * Unlike JDBC, jOOQ throws {@link RuntimeException}, knowing that + *

+ *

+ * Apart from jOOQ's own {@link DataAccessException} subtypes, which are thrown + * by jOOQ's internals, most {@link SQLException} types (or + * {@link R2dbcException} types) are translated and wrapped by: + *

* * @author Sergey Epik - Merged into jOOQ from Spring JDBC Support * @author Lukas Eder