mirror of https://github.com/ecmwf/eccodes.git
ECC-1783: grib_to_netcdf: No error message when input file has invalid fields
This commit is contained in:
parent
13e38aae92
commit
4752afb09e
|
@ -4225,7 +4225,15 @@ int grib_tool_new_filename_action(grib_runtime_options* options, const char* fil
|
|||
grib_handle_delete(h);
|
||||
}
|
||||
|
||||
grib_file_close(file->name, 0, &e);
|
||||
if (e != GRIB_SUCCESS) {
|
||||
grib_context_log(ctx, GRIB_LOG_ERROR, "%s (message %d)", grib_get_error_message(e), i);
|
||||
}
|
||||
|
||||
int e2 = 0;
|
||||
grib_file_close(file->name, 0, &e2);
|
||||
if (e2 != GRIB_SUCCESS) {
|
||||
grib_context_log(ctx, GRIB_LOG_ERROR, "Failed to close file %s (%s)", file->name, grib_get_error_message(e2));
|
||||
}
|
||||
|
||||
{
|
||||
/* Now do some checks */
|
||||
|
|
Loading…
Reference in New Issue