Re: SQLException.getErrorCode ?

From: Lew <noone(at)lwsc(dot)ehost-services(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: SQLException.getErrorCode ?
Date: 2010-05-03 04:26:45
Message-ID: hrlja3$dl7$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 05/01/2010 08:17 PM, Maxime Lévesque wrote:
>
> I was just thinking that putting the getSQLState string in the
> exception's toString
> message would go a long way in hinting the users that postgres [sic] does
> provide error codes.

Umm, the SQLException documentation is quite clear the 'getErrorCode()'
returns only vendor-specific codes and that 'getSQLState()' returns the SQL
state value. Since the latter is standard and the former is not, that already
"goes a long way [to] hinting ... that" PG provides SQL Standard codes.
Nothing further is needed.
<http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html>

It seems fair that there is a presumption of knowledge of the standard.

--
Lew

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruno De Fraine 2010-05-07 12:15:05 Bug: SimpleParameterList and resolved types
Previous Message Thomas Kellerer 2010-05-02 09:19:56 Re: Driver not returning the type for TYPEs