mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Fix lack of warning of unrecognized section names
1. Fix lack of warning by collecting all section names by moving m_config_sections.clear() to ArgsManager::ReadConfigFiles(). 2. Add info(file name, line number) to warning message. 3. Add a test code to confirm this situation. 3. Do clear() in ReadConfigString().
This commit is contained in:
parent
904308dca3
commit
1a7ba84e11
5 changed files with 38 additions and 26 deletions
|
|
@ -815,7 +815,7 @@ void InitParameterInteraction()
|
|||
|
||||
// Warn if unrecognized section name are present in the config file.
|
||||
for (const auto& section : gArgs.GetUnrecognizedSections()) {
|
||||
InitWarning(strprintf(_("Section [%s] is not recognized."), section));
|
||||
InitWarning(strprintf("%s:%i " + _("Section [%s] is not recognized."), section.m_file, section.m_line, section.m_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue