Skip to content

Commit

Permalink
[ETFeeder] fix out of boundary bug in lookupNode func
Browse files Browse the repository at this point in the history
  • Loading branch information
changhai0109 committed Dec 7, 2023
1 parent e7d7a7c commit a5f7a40
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion et_feeder/et_feeder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ void ETFeeder::pushBackIssuableNode(uint64_t node_id) {
}

shared_ptr<ETFeederNode> ETFeeder::lookupNode(uint64_t node_id) {
return dep_graph_[node_id];
try {
return dep_graph_.at(node_id);
} catch (const std::out_of_range& e) {
std::cerr << "looking for node_id=" << node_id
<< " in dep graph, however, not loaded yet" << std::endl;
throw(e);
}
}

void ETFeeder::freeChildrenNodes(uint64_t node_id) {
Expand Down

0 comments on commit a5f7a40

Please sign in to comment.