PostgreSQL error codes not returning in int?

I have my java program related to postgresql. I want to get error codes for sqlexception. I found the error code for postgresql here .

But Java SQLException

only contains methods for error codes returned as intgetErrorCode()

But the error codes in the reference are not of type int. Where can I get int error codes for postgresql? `

+3


source to share


1 answer


I think getSQLState () is what you are looking for:



http://docs.oracle.com/javase/6/docs/api/java/sql/SQLException.html#getSQLState ()

+5


source







All Articles