Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error handling in ETFeeder::lookupNode with detailed exception messages #10

Merged
merged 1 commit into from
Feb 6, 2024
Merged
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