137 const Keys::const_iterator it =
keys.find(key);
140 std::ostringstream
str;
141 str <<
"Key '" << key <<
"' not found.";
143 throw std::runtime_error(str.str());
150 if (it->second.type!=
type)
152 std::ostringstream
str;
153 str <<
"Wrong type for key '" << key <<
"': expected " <<
type <<
", found " << it->second.type <<
".";
155 throw std::runtime_error(str.str());
162 if (!value.empty() && it->second.value!=value)
164 std::ostringstream
str;
165 str <<
"Wrong value for key '" << key <<
"': expected " << value <<
", found " << it->second.value <<
".";
167 throw std::runtime_error(str.str());