Tools: Print failure reason (printing key values)

This commit is contained in:
Shahram Najm 2023-03-14 15:35:33 +00:00
parent be4b84a293
commit 889f7dfda3
1 changed files with 1 additions and 1 deletions

View File

@ -1048,7 +1048,7 @@ static void get_value_for_key(grib_handle* h, const char* key_name, int key_type
if (ret == GRIB_NOT_FOUND) {
snprintf(value_str, 32, "not_found");
} else {
fprintf(dump_file, "ERROR: Failed to get value for key %s\n", key_name);
fprintf(dump_file, "ERROR: Failed to get value for key %s (%s)\n", key_name, grib_get_error_message(ret));
exit(1);
}
}