From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | NielsG <NielsG(at)aquafold(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Minor Feature Request |
Date: | 2005-04-05 23:14:27 |
Message-ID: | 42531BD3.80801@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Kris Jurka wrote:
>
> 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.
>>
>
>
> This could work for a pg specific admin tool or client, but not a
> generic/portable java client.
Right, but aren't we talking about a client that knows about postgresql
internals anyway? There's no concept of line numbers, hints, etc.
associated with an exception in standard JDBC anyway, and as you said
it's not obvious what is useful to have in the error message for
standard clients.
Niels was talking about putting the line number into the message, then
parsing the message to get this info. That seems pretty horrible since
then you have lots of extra work in the app, and the app is still
postgresql-specific.. It seems much cleaner if it can just do something
like:
try {
// ...
} catch (PSQLException e) {
if (e instanceof PSQLException)
linenumber = ((PSQLException)e).getLineNumber();
else
linenumber = -1;
// handle exception
}
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-04-05 23:29:32 | Re: Minor Feature Request |
Previous Message | Kris Jurka | 2005-04-05 23:00:59 | Re: Minor Feature Request |