What is the proper way to catch and handle ORA-00001 SQLException with JDBC? What is the proper way to catch and handle ORA-00001 SQLException with JDBC? oracle oracle

What is the proper way to catch and handle ORA-00001 SQLException with JDBC?


If you don't need to be DBMS independent use SQLException.getErrorCode()

It returns the vendor specific numeric error code. For ORA-0001 this would be 1