From a5f7a40e5615eb89c2ff7d0d4a884f8f57b10b32 Mon Sep 17 00:00:00 2001 From: Changhai Man Date: Thu, 7 Dec 2023 11:16:45 -0500 Subject: [PATCH] [ETFeeder] fix out of boundary bug in lookupNode func --- et_feeder/et_feeder.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/et_feeder/et_feeder.cpp b/et_feeder/et_feeder.cpp index 714b5d6d..061a811d 100644 --- a/et_feeder/et_feeder.cpp +++ b/et_feeder/et_feeder.cpp @@ -54,7 +54,13 @@ void ETFeeder::pushBackIssuableNode(uint64_t node_id) { } shared_ptr 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) {