Re: Minor Feature Request - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Minor Feature Request
Date
Msg-id Pine.BSO.4.56.0504110006480.11110@leary.csoft.net
Whole thread Raw
In response to Re: Minor Feature Request  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc

On Wed, 6 Apr 2005, Oliver Jowett wrote:

> Perhaps we should put accessors for the various message parts on
> PSQLException, but leave the SQLException message as it currently is.
>

I've made ServerErrorMessage and its members available in the newly
released 8.1dev-400.

int errorPosition = 0;
try {
    ...
} catch (PSQLException e) {
    ServerErrorMessage m = e.getServerErrorMessage();
    if (m != null) {
        errorPosition = m.getPosition();
    }
}

Kris Jurka

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: implementing asynchronous notifications
Next
From: Kris Jurka
Date:
Subject: Re: Version 8.0-310 and PreparedStatement.getParameterMetaData()