forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Do not raise exception when you can prevent it (was Re: svncommit: r428677)
Date Fri, 04 Aug 2006 14:12:23 GMT
Bart Molenkamp wrote:
>>-----Oorspronkelijk bericht-----
>>Van: Thorsten Scherler []
>>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:
> ava/org/apache/cocoon/components/source/impl/
> 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.


View raw message