From 97c8060cdb83923ecd39c0f85ee4bda1ac65eb29 Mon Sep 17 00:00:00 2001 From: Luke Roberts Date: Tue, 18 Jun 2024 17:25:51 -0600 Subject: [PATCH] Make error message a little more informative --- src/bvals/comms/bvals_utils.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bvals/comms/bvals_utils.hpp b/src/bvals/comms/bvals_utils.hpp index 59cbc2f04c1f..0475d47a6fd8 100644 --- a/src/bvals/comms/bvals_utils.hpp +++ b/src/bvals/comms/bvals_utils.hpp @@ -104,7 +104,12 @@ void InitializeBufferCache(std::shared_ptr> &md, COMM_MAP *comm_m pcache->idx_vec = std::vector(key_order.size()); std::for_each(std::begin(key_order), std::end(key_order), [&](auto &t) { if (comm_map->count(std::get<2>(t)) == 0) { - PARTHENON_FAIL("Asking for buffer that doesn't exist"); + auto key = std::get<2>(t); + PARTHENON_FAIL(std::string("Asking for buffer that doesn't exist") + + " (sender: " + std::to_string(std::get<0>(key)) + + ", receiver: " + std::to_string(std::get<1>(key)) + + ", var: " + std::get<2>(key) + + ", location: " + std::to_string(std::get<3>(key)) + ")"); } pcache->buf_vec.push_back(&((*comm_map)[std::get<2>(t)])); (pcache->idx_vec)[std::get<1>(t)] = buff_idx++;