Report name of non-existant options to help debugging.

This commit is contained in:
Thulinma 2012-08-13 07:59:24 +02:00
parent 4641efb79d
commit 08f28d134a

View file

@ -219,7 +219,7 @@ void Util::Config::parseArgs(int argc, char ** argv){
/// If the option does not exist, this exits the application with a return code of 37.
JSON::Value & Util::Config::getOption(std::string optname){
if (!vals.isMember(optname)){
std::cout << "Fatal error: a non-existent option was accessed." << std::endl;
std::cout << "Fatal error: a non-existent option '" << optname << "' was accessed." << std::endl;
exit(37);
}
if (vals[optname].isMember("current")){