sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Commented] (SIS-189) InvalidDbaseFileFormatException should extend DataStoreException
Date Tue, 08 Dec 2015 09:59:10 GMT


Martin Desruisseaux commented on SIS-189:

Of course I think that having specific exception sub-classes is a good thing and I'm very
glad that you created them. We should probably move some of those {{DataStoreException}} subclasses
to the {{}} package. My question was only about the {{SQLException}}
subclasses, because they are invisible (I mean can not be used in a {{try ... catch}} block)
to anyone except those who target specifically the shapefile module.

That said, {{SQLException}} subclasses do not hurt. They are just at risk of being unused.
However I wonder if some of those custom subclasses have an equivalent code as XOPEN SQLstate
conventions or SQL:2003 conventions? Such codes attached to {{SQLException}} are of course
inelegant in an object-oriented language, but they have been added in {{java.lang.sql.SQLException}}
as a compromise for supporting the existing database software. Advantage of those codes is
to allow more inter-operability with the rest of the world.

> InvalidDbaseFileFormatException should extend DataStoreException
> ----------------------------------------------------------------
>                 Key: SIS-189
>                 URL:
>             Project: Spatial Information Systems
>          Issue Type: Sub-task
>          Components: Shapefile
>            Reporter: Martin Desruisseaux
>            Assignee: M. Le Bihan
>              Labels: JDBC
>             Fix For: 0.7
> {{InvalidDbaseFileFormatException}} currently extends {{SQLNonTransientException}}. But
the the fact that a {{DataStore}} uses SQL or I/O operations for fetching the data is considered
internal to the data store. The higher-level exception for data stores is rather {{DataStoreException}},
which may contain a {{SQLException}}, {{IOException}} or other kind of exceptions as its cause.

This message was sent by Atlassian JIRA

View raw message