Handle out_of_range when locating RegionInfo

This commit is contained in:
Alexey Rybalchenko 2020-06-29 12:00:56 +02:00
parent 6dd0a44308
commit 8125489776

View File

@ -233,8 +233,12 @@ class Manager
auto r = fRegions.emplace(id, tools::make_unique<Region>(fShmId, id, 0, true, nullptr, nullptr, path, flags));
return r.first->second.get();
} catch (std::out_of_range& oor) {
LOG(error) << "Could not get remote region with id '" << id << "'. Does the region creator run with the same session id?";
LOG(error) << oor.what();
return nullptr;
} catch (boost::interprocess::interprocess_exception& e) {
LOG(warn) << "Could not get remote region for id: " << id;
LOG(warn) << "Could not get remote region for id '" << id << "'";
return nullptr;
}
}