// TODO additional: check chain-to, other lint
- for (const auto &name : services_to_check) {
+ for (size_t i = 0; i < services_to_check.size(); ++i) {
+ const std::string &name = services_to_check[i];
+ std::cout << "Checking service: " << name << "...\n";
try {
service_record *sr = load_service(service_set, name, service_dir_opts.get_paths());
service_set[name] = sr;
return 0;
}
+static void report_unknown_setting_error(const std::string &service_name, const char *setting_name)
+{
+ std::cerr << "Service '" << service_name << "', unknown setting: " << setting_name << "\n";
+}
+
static void report_error(dinit_load::setting_exception &exc, const std::string &service_name, const char *setting_name)
{
std::cerr << "Service '" << service_name << "', " << setting_name << ": " << exc.get_info() << "\n";
#endif
}
else {
- throw service_description_exc(name, "Unknown setting: " + setting);
+ report_unknown_setting_error(name, setting.c_str());
}
}
catch (setting_exception &exc) {