ivi::settings::manager::load_settings(std::string const & dir)
{
if (dir.length() == 0)
- throw std::logic_error("Zero length settings plugin directory path.");
+ throw std::runtime_error("Zero length settings plugin "
+ "directory path.");
namespace fs = boost::filesystem;
}
if (settings_.size() == 0) {
- std::cerr << "Settings plugin directory \""
- << dir << "\" has no plugins.\n";
+ throw std::runtime_error("Settings plugin directory \""
+ + dir + "\" has no plugins.");
} else {
std::cerr << "Registered settings plugins: \n";
for (auto const & i : settings_)
std::cerr << "\t" << i.first << '\n';
}
} else {
- std::cerr << "Settings plugin directory \""
- << dir << "\" does not exist.\n";
+ throw std::runtime_error("Settings plugin directory \""
+ + dir + "\" does not exist.");
}
}