Jody Garnett ha scritto:
> On 25/06/2010, at 5:47 PM, Andrea Aime wrote:
> 
>> +1 on adding a similar chained runtime exception to iterators,
>> better than nothing.
> 
> I will try and cook up a patch / proposal.
> 
> However I have a dreaded insight; for our use case of using a while
> loop: you asked how often people need to do a try / catch inside the
> while loop - in my experience I end up doing it all the time (perhaps
> my data is of poor quality; or perhaps I am just being too careful).

Perhaps you don't consider that today we don't attribute contents
and use converters to "fix" them. Or maybe you really have crappy
geometry all the time (something that will make JTS throw exceptions
during geometry construction).

>  If we are doing this in a single try/catch/finally block - there is
> no difference in the number of lines of code (and thus usability of
> the library) if using a checked exception.
> 
>> If you're looking into switching all checked exception off in the
>> data access layer, a solid -1
> 
> Yeah not interested; creating the iterator() is where we are most
> likely to have a real IOException.

We have no exceptions there either:

public interface FeatureCollection<T extends FeatureType, F extends 
Feature> {
    ...
    FeatureIterator<F> features();
    ...
}

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to