From b5a4bf0e0c9fc8fa9702e8e56714c5610666c6ca Mon Sep 17 00:00:00 2001 From: Juliane Dannberg Date: Fri, 14 Feb 2025 16:42:15 +0100 Subject: [PATCH] provide more information about what went wrong when parsing a map --- source/utilities.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/utilities.cc b/source/utilities.cc index 3a586b63b07..b5e413af1af 100644 --- a/source/utilities.cc +++ b/source/utilities.cc @@ -523,7 +523,12 @@ namespace aspect ExcMessage("parse_map_to_double_array can only check the structure " "of the parsed map for " + options.property_name - + " if an expected number of values for each key is given.")); + + " if an expected number of values for each key is given. " + "The expected number of values is " + + std::to_string(options.list_of_required_keys.size()) + + ", but instead " + + std::to_string(options.n_values_per_key.size()) + + " were provided.")); // First: parse the string into a map depending on what Pattern we are dealing with std::multimap parsed_map = parse_string_to_map(input_string,