Bart Molenkamp wrote:
-----Oorspronkelijk bericht-----
Van: Thorsten Scherler [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 4 augustus 2006 13:09
Aan: Forrest Developers List
Onderwerp: Do not raise exception when you can prevent it (was Re:


...


IMO it is way cleaner to test whether the source.exist() before trying
to read form it. This way a FileNotFoundException is prevented.


Please note that some source implementations don't return a correct
answer. For example, the SitemapSource (for cocoon://) always returns
true when asking for exists(), see:

http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-core/src/main/j
ava/org/apache/cocoon/components/source/impl/SitemapSource.java

I don't know about other source implementations, but this one caused me
some trouble...

Ahhh... thanks for the heads up. This might be why the original Forrest conf moudle was written with Try...catch blocks. We should bear this in mind if a problem with the modified code arises.

Ross