Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
Error handling
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
This optional top level configuration element allows configuring the action to be taken by the generator in case of unexpected exceptions encountered during the code generation.
<configuration> <!-- Behaviour when encountering an exception outside of jOOQ's control. Defaults to FAIL --> <onError>FAIL</onError> <!-- Behaviour when encountering an unused configuration element. Defaults to LOG --> <onUnused>LOG</onUnused> <!-- Behaviour when encountering deprecated configuration. Defaults to LOG --> <onDeprecated>LOG</onDeprecated> <!-- Behaviour when encountering experimental configuration. Defaults to LOG --> <onExperimental>LOG</onExperimental> <!-- Behaviour when encountering unsupported configuration. Defaults to FAIL --> <onMisconfiguration>FAIL</onMisconfiguration> <!-- Behaviour when encountering meta data that causes problems with configuration. Defaults to LOG --> <onMetadataProblem>LOG</onMetadataProblem> <!-- Behaviour when encountering a slow meta data query. Defaults to LOG --> <onPerformanceProblem>LOG</onPerformanceProblem> </configuration>
See the configuration XSD, standalone code generation, and maven code generation for more details.
new org.jooq.meta.jaxb.Configuration() // Behaviour when encountering an exception outside of jOOQ's control. Defaults to FAIL .withOnError(OnError.FAIL) // Behaviour when encountering an unused configuration element. Defaults to LOG .withOnUnused(OnError.LOG) // Behaviour when encountering deprecated configuration. Defaults to LOG .withOnDeprecated(OnError.LOG) // Behaviour when encountering experimental configuration. Defaults to LOG .withOnExperimental(OnError.LOG) // Behaviour when encountering unsupported configuration. Defaults to FAIL .withOnMisconfiguration(OnError.FAIL) // Behaviour when encountering meta data that causes problems with configuration. Defaults to LOG .withOnMetadataProblem(OnError.LOG) // Behaviour when encountering a slow meta data query. Defaults to LOG .withOnPerformanceProblem(OnError.LOG)
See the configuration XSD and programmatic code generation for more details.
import org.jooq.meta.jaxb.* configuration { // Behaviour when encountering an exception outside of jOOQ's control. Defaults to FAIL onError = OnError.FAIL // Behaviour when encountering an unused configuration element. Defaults to LOG onUnused = OnError.LOG // Behaviour when encountering deprecated configuration. Defaults to LOG onDeprecated = OnError.LOG // Behaviour when encountering experimental configuration. Defaults to LOG onExperimental = OnError.LOG // Behaviour when encountering unsupported configuration. Defaults to FAIL onMisconfiguration = OnError.FAIL // Behaviour when encountering meta data that causes problems with configuration. Defaults to LOG onMetadataProblem = OnError.LOG // Behaviour when encountering a slow meta data query. Defaults to LOG onPerformanceProblem = OnError.LOG }
See the configuration XSD and gradle code generation for more details.
configuration { // Behaviour when encountering an exception outside of jOOQ's control. Defaults to FAIL onError = "FAIL" // Behaviour when encountering an unused configuration element. Defaults to LOG onUnused = "LOG" // Behaviour when encountering deprecated configuration. Defaults to LOG onDeprecated = "LOG" // Behaviour when encountering experimental configuration. Defaults to LOG onExperimental = "LOG" // Behaviour when encountering unsupported configuration. Defaults to FAIL onMisconfiguration = "FAIL" // Behaviour when encountering meta data that causes problems with configuration. Defaults to LOG onMetadataProblem = "LOG" // Behaviour when encountering a slow meta data query. Defaults to LOG onPerformanceProblem = "LOG" }
See the configuration XSD and gradle code generation for more details.
// The jOOQ-codegen-gradle plugin has been introduced in version 3.19. // Please use the official plugin instead of the third party plugin that was recommended before.
The available error actions are:
-
FAIL
- The exception will be thrown and handled by the caller (e.g. Maven) -
LOG
- The exception will be handled by the generator by logging it as a warning -
SILENT
- The exception will be silently ignored by the generator
Feedback
Do you have any feedback about this page? We'd love to hear it!