Improved error message

This commit is contained in:
Shahram Najm 2023-01-05 16:41:09 +00:00
parent 6d6fae0c66
commit f529885d61
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ static int execute(grib_action* a, grib_handle* h)
if (self->nofail)
return 0;
if (ret != GRIB_SUCCESS) {
grib_context_log(h->context, GRIB_LOG_ERROR, "Error while setting key %s (%s)",
grib_context_log(h->context, GRIB_LOG_ERROR, "Error while setting key '%s' (%s)",
self->name, grib_get_error_message(ret));
}
return ret;

View File

@ -34,7 +34,7 @@ EOF
${tools_dir}/bufr_filter -f $tempFilt $sample_bufr4 2>$tempOut
# Check the right error message came out
grep -q "ECCODES ERROR.*Error while setting key pack (Encoding invalid)" $tempOut
grep -q "ECCODES ERROR.*Error while setting key 'pack' (Encoding invalid)" $tempOut
# Now fix the order of keys and rerun