On Sun, Nov 4, 2012 at 12:58 PM, Jody Garnett <[email protected]> wrote:
> 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 …

Except that client is allowed not to pass a progress listener, and
geotools progress
listeners are the first type I see around that are also used to handle
exceptions:
the first time I encountered them while working on processes I wasted a lot
of time trying to find out why a process was giving me back nothing, and
also was not giving me back any error: I did not provide any
progress listeners, since I was not interested in progress, only in the result.

At the very least, if the caller is not providing a listener the exception
should come back right away imho.
One way to get this is to have NullProgressListener rethrow exceptions,
so that if you either provide null or explicitly NullProgressListener
(basically saying, don't care about progress) you don't end up getting
the side effect of ignoring exceptions as well.

And/or have a flag in NullProgressListener to control the rethrowing
behavior, and have the instance used when null is passed in to
be a rethrowing one.

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
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

Reply via email to