[Pljava-dev] Java 6: Copy code from the JDBC driver?

From: johann at myrkraverk(dot)com (Johann 'Myrkraverk' Oskarsson)
To:
Subject: [Pljava-dev] Java 6: Copy code from the JDBC driver?
Date: 2010-10-07 11:22:33
Message-ID: AANLkTinuVNxvSGjBJZZnXt9=G1R=oD0=ZNA-w3-PhYqB@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hi Thomas,

On Thu, Oct 7, 2010 at 5:14 AM, Thomas Hallgren <thomas at tada.se> wrote:
> On 10/07/2010 01:33 AM, Johann 'Myrkraverk' Oskarsson wrote:

>> The Java 6 JDBC API defines several new virtual methods. ?One of which
>> is Connection.createStruct(). ?The JDBC Driver throws in a roundabout
>> way an equivalent to
....
>> Using a utility class PSQLException and the constant "0A000" comes
>> from the static PSQLState object NOT_IMPLEMENTED.
>>
>> Is it worthwhile to copy this code as-is from the JDBC driver or
>> should we implement our own "not implemented" exception code path,
>> such as using SQLFeatureNotSupportedException?
>>
>> I'm inclined to the latter.

> So am I. It's much easier to trap exceptions when using inheritance. The
> important thing is that we propagate correct error codes on uncaught
> exceptions.

The PSQLException does inherit SQLException. I'll start throwing
SQLFeatureNotSupportedExceptions. Stay tuned for CVS updates.

Johann

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Johann 'Myrkraverk' Oskarsson 2010-10-08 00:01:40 [Pljava-dev] SPIConnection.java: Java 6 patch
Previous Message Johann 'Myrkraverk' Oskarsson 2010-10-06 23:33:07 [Pljava-dev] Java 6: Copy code from the JDBC driver?