From a77cce79427f5bcca569ce70d16c70d5259cd537 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 29 Jul 2022 17:44:31 +0100 Subject: [PATCH] Error handling: Add a user-friendly error message (test) --- tests/grib_filter.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/grib_filter.sh b/tests/grib_filter.sh index e2e52bae5..e85d5727b 100755 --- a/tests/grib_filter.sh +++ b/tests/grib_filter.sh @@ -227,7 +227,7 @@ cat >$tempFilt < $tempOut -cat $tempOut + cat >$tempRef <$tempFilt < $tempOut +status=$? +set -e +[ $status -ne 0 ] +grep -q "ECCODES ERROR.*Number is too large" $tempOut + + # Clean up rm -f $tempGrib $tempFilt $tempOut $tempRef rm -f ${data_dir}/formatint.rules ${data_dir}/binop.rules