Oliver Heger wrote:
An alternative is to throw a ConfigurationNotFound exception extending ConfigurationException instead of returning null, but I'm not fond of this.
Must think more about this. Maybe Oliver has some ideas.
Not really, but I would prefer a ConfigurationNotFound exception over a null return value.
There may be an issue with the ChainedLocator if we opt for an exception instead of a null value. If all Locators in the ChainedLocator fail to locate the file, what exception will be thrown at the end ? We can't wrap all exceptions in a single exception, so we are losing information about the causes of the failure.
I think we'd better log the cause of the failure and return null. The end result for the user if almost the same, the constructor or the load method will throw a ConfigurationException due to the null URL, and the cause will be logged.
Emmanuel Bourg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]