Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[ETFeeder] fix out of boundary bug in lookupNode func #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading