On Tue, Jan 13, 2009 at 10:48 AM, Ulises <[email protected]> wrote: >> And I choose a slightly modified form of 2, but have the config module >> call each registered validator immediately and then close things down >> if one fails. > > The problem is that validators are registered asynchronously so, from > the config's point of view, you can't be sure you've ran them all once > you're done loading the config. From the module's point of view, > however, once you start pulling values out of the config you know > they've been loaded. I think that checking that a value is valid in > the init() of a module might be a better approach. > > Generally, though, does this whole validators thingie make sense? >
I think it would make more sense for the couchdb modules which are being configured to raise whatever errors they may have, upon receiving a config change. It's just a matter of documenting those errors better. Trying to second-guess the work of admins seems like more headache than help. I think the more straightforward approach will give us all the startup error messages we need, if we see it through. -- Chris Anderson http://jchris.mfdz.com
