Commit e14cc5ec authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

[master] address SunStudio build failure

parent 8cb64055
......@@ -75,9 +75,11 @@ CounterDictionaryImpl::deleteElement(const std::string& name) {
Counter&
CounterDictionaryImpl::getElement(const std::string& name) {
try {
return (*(dictionary_.at(name)));
} catch (const std::out_of_range&) {
DictionaryMap::const_iterator i = dictionary_.find(name);
if (i != dictionary_.end()) {
// the key was found. return the element.
return (*(i->second));
} else {
// If an element with specified name does not exist, throw
// isc::OutOfRange.
isc_throw(isc::OutOfRange, "Element " << name << " does not exist");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment