> > Yes - Processing collection throws IOExceptions, BaseFeatureCollection
> > follows the "keep calm and carry on" moto.
> >
>
I was probably too quick in my evaluation, it calls progress.exceptionOccured(
exception ) alloying the client code to decide what to do …
> I believe this is a really bad idea... the method does throw a IOException
> for a reason, if an implementor wants to keep on processing regardless
> they can do so by their own choice and should swallow the exceptions
> in their own visitor implementation.
>
> Exceptions must be willingly ignored, not the other way around.
Fair enough - I do not mind as long as we make it consistent.
Let me review the state of play - here are all the implementations of accepts(
visitor, progress ):
DecoraingFeatureCollection: remembers if an exception occurred, continues, and
carefully throws a RuntimeException at the end …
MappingFeatureCollection: progress.exceptionOccured
ProcessingCollection: progress.exceptionOccured, and then immediately throws
IOException
SampleDataAccessFeatureCollection: no exception handling, not even any use of
progress :(
AbstractFeatureCollection: progress.exceptionOccured
SubFeatureCollection: progress.exceptionOccured
AdaptorFeatureCollection: progress.exceptionOccured
ContentFeatureCollection: progress.exceptionOccured
DataFeatureCollection: progress.exceptionOccured
DecoratingSimpleFeatureCollection: remembers if an exception occurred,
continues, and carefully throws a RuntimeException at the end …
DefaultFeatureCollection: progress.exceptionOccured
GeoGitSimpleFeatureCollection: not implemented
MockFeatureCollection: not implemented
PreGeneralizedFeatureCollection: progress.exceptionOccured
SpatialIndexFeatureCollection: progress.exceptionOccured <-- very interesting
implementation
TreeSetFeatureCollection: progress.exceptionOccured
Jody
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel