Skip to content

Commit e7fa91d

Browse files
authored
Merge pull request #6233 from jdannberg/add_more_info
provide more information about what went wrong when parsing a map
2 parents 620c9ea + b5a4bf0 commit e7fa91d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/utilities.cc

+6-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,12 @@ namespace aspect
523523
ExcMessage("parse_map_to_double_array can only check the structure "
524524
"of the parsed map for "
525525
+ options.property_name
526-
+ " if an expected number of values for each key is given."));
526+
+ " if an expected number of values for each key is given. "
527+
"The expected number of values is "
528+
+ std::to_string(options.list_of_required_keys.size())
529+
+ ", but instead "
530+
+ std::to_string(options.n_values_per_key.size())
531+
+ " were provided."));
527532

528533
// First: parse the string into a map depending on what Pattern we are dealing with
529534
std::multimap<std::string, double> parsed_map = parse_string_to_map(input_string,

0 commit comments

Comments
 (0)