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

From Peter.Zoche@materna.de
Subject Re: SQLException and error code
Date
Msg-id 3617A3C21370D045B75C0A40A7A6530D0B37E192@ntexc2buc.do-office.buc.materna.com
Whole thread Raw
In response to SQLException and error code  (Peter.Zoche@materna.de)
Responses Re: SQLException and error code
Re: SQLException and error code
List pgsql-jdbc
Because in the postgresql documentation you can find the following page:

http://www.postgresql.org/docs/8.0/interactive/errcodes-appendix.html#ERRCOD
ES-TABLE

There you can see all ERROR CODES!

So why is there a method getErrorCode(), if the only thing it does
is to return zero?

-----Ursprüngliche Nachricht-----
Von: Oliver Jowett [mailto:oliver@opencloud.com]
Gesendet: Dienstag, 26. Juli 2005 16:04
An: Peter.Zoche@materna.de
Cc: pgsql-jdbc@postgresql.org
Betreff: Re: [JDBC] SQLException and error code


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: "Kevin Grittner"
Date:
Subject: Re: Timestamp weirdness
Next
From: Oliver Jowett
Date:
Subject: Re: Timestamp weirdness