theGamblerRises
theGamblerRises

Reputation: 696

JOOQ : getNextException call?

I am using JOOQ's batch* methods. I tried with batchUpdate, batchInsert methods as well.

Batch batch = create.batchStore(questions);
int[] counts = batch.execute();

Where questions is a list of Generated TableRecords class. I get success while trying to insert data. But I get error while trying to update data. My query is -

Upvotes: 2

Views: 754

Answers (1)

Lukas Eder
Lukas Eder

Reputation: 221145

jOOQ's DataAccessException is an unchecked wrapper for the JDBC SQLException. If you want to get a hold of those, you can access the SQLException as such:

((SQLException) dataAccessException.getCause()).getNextException();

Upvotes: 4

Related Questions