I would like to be able to say:
typedef std::map<int,std::vecto<uint64_t>> ResRegestry;
typedef std::map<int, ResRegestry> EngagedList;
EngagedList engaged_list;
//...
try {
engaged_list.at(some_key).at(another_key));
} catch (EngagedListException& e) {
cout << "no such key for EngagedList\n";
} catch (ResRegestryException& e) {
cout << "no such key for ResRegestry\n";
}
Intuitively it seems me that there should be a simple way to set custom exceptions EngagedListException, ResRegestryException without wrapping the whole std::map class. I would appreciate any suggestions. Thanks.