From f081f3794da2b6bd66086bc363b045252b42f0f1 Mon Sep 17 00:00:00 2001 From: Lukas Korencik Date: Fri, 20 Oct 2023 19:08:54 +0200 Subject: [PATCH] interface: Improve error message if lookup in data layout fails. --- include/vast/Interfaces/DefaultDataLayoutTypeInterface.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/vast/Interfaces/DefaultDataLayoutTypeInterface.hpp b/include/vast/Interfaces/DefaultDataLayoutTypeInterface.hpp index 4087ca0a6f..e2304c8f5f 100644 --- a/include/vast/Interfaces/DefaultDataLayoutTypeInterface.hpp +++ b/include/vast/Interfaces/DefaultDataLayoutTypeInterface.hpp @@ -35,15 +35,16 @@ namespace vast *out, current, entries.size()); }; + auto casted_self = static_cast< const ConcreteType & >(self); for (const auto &entry : entries) { auto raw = dl::DLEntry(entry); - auto casted_self = static_cast< const ConcreteType & >(self); if (casted_self == raw.type) handle_entry(raw); } - VAST_CHECK(out.has_value(), "Data layout query did not produce a value!"); + VAST_CHECK(out.has_value(), "Data layout query of {0} did not produce a value!", + casted_self); return *out; }