Thanks Peter - or rather good "catch"
Can you cut and paste the modified code for me? I would be happy to
review and think about this change.
We do have a common problem where data store implementors say they
canProcess, but then they really cannot. This has resulted in a very
unhappy GeoServer community on occasion.
If I understand the need:
- you would like a decent failure reported when you cannot connect
- we cannot afford to let a single bad apple ruin the batch
Jody
> Hi!
>
> In the SVN HEAD version DataStoreFinder.getDataStore(...) the whole
> canProcess(...), createDataStore(...) cycle is in a try {}
> catch(Throwable t) block. This way if a DataStore can handle a type of
> database, but fails to open it (e.g. corrupt db file) no exception is
> thrown, only a debug message is logged. This contradicts with the
> javadoc, which says that an IOException is thrown "If a suitable loader
> can be found, but it can not be attached to the specified resource
> without errors." And even the comment in the catch block states that it
> "Protect against DataStores that don't carefully code canProcess".
>
> I modifyed my copy in a way that only the canProcess(..) is in a
> try-catch block, but I think the SVN version should be modified also.
> The same allpies to FileDataStoreFinder also.
>
> Greetings,
> Peter
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users