for (int i = 0; i < max; i++) {
if (i <= max_index_src && max <= max_index_dst) {
key = {path_src.at(i)->netpoint_, path_dst.at(max)->netpoint_};
- if (bypassRoutes_.find(key) != bypassRoutes_.end()) {
+ try {
bypassedRoute = bypassRoutes_.at(key);
break;
+ } catch (std::out_of_range& unfound) {
+ // Do nothing
}
}
if (max <= max_index_src && i <= max_index_dst) {
key = {path_src.at(max)->netpoint_, path_dst.at(i)->netpoint_};
- if (bypassRoutes_.find(key) != bypassRoutes_.end()) {
+ try {
bypassedRoute = bypassRoutes_.at(key);
break;
+ } catch (std::out_of_range& unfound) {
+ // Do nothing
}
}
}
if (max <= max_index_src && max <= max_index_dst) {
key = {path_src.at(max)->netpoint_, path_dst.at(max)->netpoint_};
- if (bypassRoutes_.find(key) != bypassRoutes_.end()) {
+ try {
bypassedRoute = bypassRoutes_.at(key);
break;
+ } catch (std::out_of_range& unfound) {
+ // Do nothing
}
}
}