Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Hello!
When constraint violation exception occurs I need machine-readeble attributes of SQLIntegrityConstraintViolationException.
Here example how it works in PG:
if ( |
ex instanceof PSQLException pex && |
ex.getSQLState().startsWith("23") |
) {
|
return new ConstraintViolationException( |
null, |
pex.getServerErrorMessage().getSchema(), // <---- |
pex.getServerErrorMessage().getTable(), // <---- |
pex.getServerErrorMessage().getConstraint() // <---- |
);
|
}
|