commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [configuration] no exception on missing key
Date Fri, 02 Sep 2005 01:20:44 GMT
Oliver Heger wrote:

> The purpose is that the configurations contained in a 
> CompositeConfiguration should have the same exception behavior as the 
> composite itself. Unfortunately when loaded from a ConfigurationFactory, 
> it is not possible to define the CompositeConfiguration's exception 
> flag, so it is always false.
> I guess this should be fixed, or at least the 
> setThrowExceptionOnMissing() method overloaded in CompositeConfiguration 
> to set the flags on the contained configs. Then it would be possible to 
> turn this on after it was loaded by the factory.

Does it really make sense to change the flag on only one of the 
configurations ? What about supporting a syntax like this instead:

<configuration throwExceptionOnMissing="true">
   <xml fileName="prodConfig.xml" optional="true"/>

Emmanuel Bourg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message