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