Are you comfortable submitting a patch (and jira ticket) for this issue? I
agree with you but it would help if you can track down the code that is
causing the problem :)
On Tue Dec 09 2014 at 10:16:10 AM Karl-Philipp Richter <[email protected]>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> It'd be fine in IMO if it'd throw the ConnectException, but it throws
> a RuntimeException which wraps the ConnectException (the
> ConnectionException is the cause of a cause). This requires any code
> using DataStore.getFeatureSource to catch RuntimeException and then to
> evaluate the cause of the instance in order to distungish between
> exceptions which are expected to be thrown by geotools and any other
> possible exception.
>
> Am 12/09/2014 um 06:57 PM schrieb Jody Garnett:
> > This is up to each DataStore implementor to figure out. I believe
> > the API allows the author to throw an IOException in the event of a
> > connection failure (since IO is occurring).
> >
> > Do you have a specific RuntimeException stack trace in mind? I
> > think a developer is just being lazy... your
> > java.net.ConnectException is an IOException and should be returned
> > directly as is.
> >
> > On Tue Dec 09 2014 at 12:44:18 AM Karl-Philipp Richter
> > <[email protected]> wrote:
> >
> > Hi, currently org.geotools.data.DataStore.getFeatureSource wraps a
> > java.net.ConnectException which occurs when it is invoked with an
> > instance of ConnectionParameter which causes TCP/IP connection to
> > fail into a RuntimeException which is much less expressive than a
> > newly created or already existing geotools exception (I'd create
> > and use something like DataStoreConnectionException (which can
> > extend RuntimeException or even better GeotoolsException or
> > GeotoolsRuntimeException extending RuntimeException)).
> >
> > -Kalle Richter
> >>
> >> ------------------------------------------------------------
> >> ------------------ Download BIRT iHub F-Type - The Free
> >> Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge
> >> Your Business Reports and Dashboards with Interactivity, Sharing,
> >> Native Excel Exports, App Integration & more Get technology
> >> previously reserved for billion-dollar corporations, FREE
> >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&
> >> iu=/4140/ostg.clktrk
> >> _______________________________________________ GeoTools-Devel
> >> mailing list [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJUhzxgAAoJEGadKJ8eJ7ZGNjEIALS6Bp0ROdwqVtRkdlzUBmWd
> vBdQAReAYEKUIydja54A0Sdb+ZRcxo/BbCbPW60YEobX8I+g51TEQ/nqHJKRfSSQ
> Rky2jFOMw2F1+fbMQp2oBflgYAYVzHuLUprXSd/9hg4i9tZZBLkXEMlY+kd8ylJ7
> e18hNZJxWmShzuHnbN77eYKBKTWsbkPFaIXEoCOkBMehDsE+UGjWczTs3rFaEX5N
> 0SAqRC3aNAIGcK9OpO3oY4FuYklBfin2paB+BsSqRm+2PHAAnBKQyGieOeCnzxyU
> +EXJEATvYNH2wYMsR6/TjA4HN8aQbTzTuc0HAMRoN18F0t5QAJMaeo84hAMFCkk=
> =z+yf
> -----END PGP SIGNATURE-----
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel