BUFR subset extraction: improve error message
@@ -172,7 +172,11 @@ static int pack_long(grib_accessor* a, const long* val, size_t *len)
v[0]=1;
err=grib_pack_long(self->packAccessor,v,&l);
- if (err) return err;
+ if (err) {
+ if (err == GRIB_ENCODING_ERROR)
+ grib_context_log(a->context,GRIB_LOG_ERROR,"Could not extract subset(s).\n\tHint: Did you forget to set unpack=1?");
+ return err;
+ }
return err;
}
