Subject Re: Repost: [Fwd: [Firebird-Java] GDS Error Codes in SQLExceptions/build.xml]
Author Mark O'Donohue
Hi Uwe

Uwe Jäger wrote:

>Anybody any comments?
>
>
>Hi,
>
>in order to have the proper error codes in the SQLException (and make
>firebirdsql more compatible with interclient) I have changed some catch
>(GDSException e) { throw new SQLException("some text"); } to [...] throw
>new FBSQLException(e); [...]. A patch is attached.
>
>

Will that give the stacktrace back to the original GDSException failure
spot?

One thing I have found difficult, with that catch ... throw new
SQLException() block, is that it hides the position of the original
GDSException. The stacktrace for instance points to the new "throw new
SQLException" line rather than that of the original error (I put
printStackTrace() calls in to pin down the real reason/line).

I assume there is a good reason (and excuse me if my ignorance is
showing, since I really am not up to date with what's happening here)
why GDSException doesn't inherit from SQLException or FBSQLException and
even if caught, it just throws the same exception again.

Cheers

Mark