mirror of https://github.com/ecmwf/eccodes.git
Tools: Print failure reason (printing key values)
This commit is contained in:
parent
be4b84a293
commit
889f7dfda3
|
@ -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) {
|
if (ret == GRIB_NOT_FOUND) {
|
||||||
snprintf(value_str, 32, "not_found");
|
snprintf(value_str, 32, "not_found");
|
||||||
} else {
|
} 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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue