Re: SQLException and error code - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: SQLException and error code
Date
Msg-id 42E642E4.5050604@opencloud.com
Whole thread Raw
In response to SQLException and error code  (Peter.Zoche@materna.de)
List pgsql-jdbc
Peter.Zoche@materna.de wrote:

> I am using postgresql-8.0-310.jdbc3.jar in my application.
> In order to get the error code from an SQLException I have
> to use sqlexception.getSQLState(). Shouldn't it be
> getErrorCode()?

We get a SQLSTATE from the server already, so it makes sense to make
that available via getSQLState().

What exactly do you suggest we return from getErrorCode()?

-O

pgsql-jdbc by date:

Previous
From: Peter.Zoche@materna.de
Date:
Subject: SQLException and error code
Next
From: "Kevin Grittner"
Date:
Subject: Re: Timestamp weirdness