Our application is based on Java, JPA and an Oracle database. If a database operation fails, I get a SQLException
or one of it's derivates.
In my case I'd like to distinguish, whether a SQLIntegrityConstraintViolationException
has been caused by a problem with a unique or a foreign key constraint.
The log shows the error code ORA-00001
for the unique constraint violation, however, I was looking for a list of the other codes in order to reacte to the right ones.
I'm aware that these codes are vendor specific and SO has an easy to find answer for MySQL. I would need the same for Oracle.