XBT_INFO("Option %s has been renamed to %s. Consider switching.", name.c_str(), res->get_key().c_str());
return res;
} else {
- throw std::out_of_range("Bad config key: " + name);
+ std::string msg = "Bad config key: " + name + "\nExisting config keys:\n";
+ for (auto const& elm : options)
+ msg += " " + elm.first + ": (" + elm.second->get_type_name() + ")" + elm.second->get_string_value() + "\n";
+ throw std::out_of_range(msg);
}
}
}