diff --git a/src/cache_cf.cc b/src/cache_cf.cc index b66ba93cd91..58f69f43f54 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -625,6 +625,9 @@ Configuration::Parse() defaults_postscriptum(); + if (unrecognizedDirectives) + throw TextException(ToSBuf("Found ", unrecognizedDirectives, " unrecognized directive(s)"), Here()); + /* * We must call configDoConfigure() before leave_suid() because * configDoConfigure() is where we turn username strings into @@ -632,15 +635,6 @@ Configuration::Parse() */ configDoConfigure(); - // TODO: Throw before configDoConfigure(). Doing that would reduce the set - // of configuration errors Squid can detect in one execution, but we should - // not apply a clearly broken configuration, especially when we are going to - // quit anyway. While some legacy parse_foo() functions apply significant - // changes before configDoConfigure(), we cannot easily stop them. We can - // easily stop configDoConfigure(). - if (unrecognizedDirectives) - throw TextException(ToSBuf("Found ", unrecognizedDirectives, " unrecognized directive(s)"), Here()); - if (opt_send_signal == -1) { Mgr::RegisterAction("config", "Current Squid Configuration",