Subject Re: Need Exception Listing for RC3 Driver
Author jbovitzii <jlb@rocsoft.com>
Hi Roman,

Thanks so much for your help.

I will continue with my testing and investigate the source code you
indicate.

If I do happen to get a good list together, I will try to post some
documentation...

Best Regards,
James L. Bovitz II

--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy
<rrokytskyy@a...>" <rrokytskyy@a...> wrote:
> Hi,
>
> > I am experimenting with replacing Interclient/Interserver with
> > Jaybird RC3 in a project I am currently working on Jbuilder7
using
> > DataExpress components.
> >
> > I have current code that deals with exceptions that might be
thrown
> > when opening the database connection. I would like to use
something
> > similar with the Jaybird driver but could not find any
> > documentation regarding the Exception types that various
operations
> > throw.
>
> We do not have a hierarchy of exceptions, because it migh be
pretty
> big. We throw SQLException subclass that returns you Firebird
error
> code if it is available (there might be other exceptions related
to
> JCA architecture). List of constants can be found in API guide or
> Language Reference or in class org.firebirdsql.gds.ISCConstants.
>
> Your catch clause should look like this:
>
> try {
>
> //... do something here
>
> } catch(SQLException ex) {
>
> switch(ex.getErrorCode()) {
>
> case ISCConstants.isc_read_only :
> throw new MyReadOnlyException();
> ....
>
> default :
> throw new MyDefaultException();
> }
> }
>
> > Is this documented anywhere?
>
> Probably it is not documented anywhere. Rick, can you include this
in
> FAQ and release notes?
>
> Best regards,
> Roman Rokytskyy