From f529885d61051b79bda07b2c063332a0fb05e373 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 5 Jan 2023 16:41:09 +0000 Subject: [PATCH] Improved error message --- src/action_class_set.c | 2 +- tests/bufr_ecc-1259.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/action_class_set.c b/src/action_class_set.c index 07d5bc431..8febce99d 100644 --- a/src/action_class_set.c +++ b/src/action_class_set.c @@ -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; diff --git a/tests/bufr_ecc-1259.sh b/tests/bufr_ecc-1259.sh index 5cca062ae..a65e65be5 100755 --- a/tests/bufr_ecc-1259.sh +++ b/tests/bufr_ecc-1259.sh @@ -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