Report when unknown config file options are ignored
This commit is contained in:
parent
222e627322
commit
04ce0d88ca
1 changed files with 7 additions and 3 deletions
10
src/util.cpp
10
src/util.cpp
|
@ -859,9 +859,13 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, std::string& error, boo
|
|||
}
|
||||
|
||||
// Check that the arg is known
|
||||
if (!IsArgKnown(strKey) && !ignore_invalid_keys) {
|
||||
error = strprintf("Invalid configuration value %s", option.first.c_str());
|
||||
return false;
|
||||
if (!IsArgKnown(strKey)) {
|
||||
if (!ignore_invalid_keys) {
|
||||
error = strprintf("Invalid configuration value %s", option.first.c_str());
|
||||
return false;
|
||||
} else {
|
||||
LogPrintf("Ignoring unknown configuration value %s\n", option.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue