Re: Bug found in the driver

From: Denis Bucher <dbucher(at)niftycom(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug found in the driver
Date: 2001-08-06 10:09:36
Message-ID: 5.1.0.14.0.20010806120848.025f66b0@mail.niftycom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

At 22:01 03.08.01 +0200, you wrote:

Hello !

>On Fri, 03 Aug 2001 15:06:46 +0200, Denis Bucher wrote:
> >I've FOUND A BUG in the postgres JDBC driver !
>
>OK, please help us fix it.
>
> >If you want to see the source online :
> >http://cs.baylor.edu/~speegle/5335/org/postgresql/
> >
> >Please look at Driver.class :
> >
> > } catch(Exception ex2) {
> > throw new PSQLException("postgresql.unusual",ex2);
> >
> >But it doesn't print the exception ex2 !!!
>
>This code is not supposed to print an exception. Please be more
>specific. What are you doing exactly? Why are we looking at this
>particular line of source code? What exception did you expect?
>Why did you expect it to be printed?

Ok, this line prints the following message :

Quelque chose de peu commun s'est produit pour faire échouer le
gestionnaire. Veuillez enregistrer cette exception: {0}

which is the french version of :

Something unusual has occured to cause the driver to fail.
Please report this exception: {0}

BUT it doesn't print the exception between '{' and '}' which makes
VERY hard to debug the problem. I found LOTS of emails in
mailing-lists only due to this problem : If the exception was
printed, people wouldn't have asked because they would have
seen "this host is not present in hba_conf", or something like
that. With my 'kludge-correction' it PRINTS the EXACT exception
that made the driver fail :

throw new PSQLException("postgresql.unusual: " + ex2);

But I know my correction isn't 'clean' because it circumvents the
PSQLException method that IMHO SHOULD print out the exception,
or else why the hell would there be that message "please report this
exception : {0}" AND why whould 'ex2' be mentionned ?

Denis

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Denis Bucher 2001-08-06 10:14:13 Re: Bug found in the driver
Previous Message RaviShankar K 2001-08-06 02:56:01 Re: Retrieving field of type bigint[]