configuration: add 'ignore-config-errors' switch

This commit is contained in:
Andrzej Rybczak
2015-05-02 21:16:11 +02:00
parent 77c702100f
commit a40508179a
6 changed files with 14 additions and 9 deletions

View File

@@ -179,7 +179,7 @@ option_parser::worker buffer(NC::Buffer &arg, ValueT &&value, TransformT &&map)
}
bool Configuration::read(const std::string &config_path)
bool Configuration::read(const std::string &config_path, bool ignore_errors)
{
std::string mpd_host;
unsigned mpd_port;
@@ -640,5 +640,5 @@ bool Configuration::read(const std::string &config_path)
));
std::ifstream f(config_path);
return p.run(f);
return p.run(f, ignore_errors);
}