diff --git a/src/grib_accessor_class_data_ccsds_packing.cc b/src/grib_accessor_class_data_ccsds_packing.cc index db40ad34b..5f148a15f 100644 --- a/src/grib_accessor_class_data_ccsds_packing.cc +++ b/src/grib_accessor_class_data_ccsds_packing.cc @@ -306,7 +306,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) #endif if (grib_get_nearest_smaller_value(hand, self->reference_value, val[0], &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } if ((err = grib_set_double_internal(hand, self->reference_value, reference_value)) != GRIB_SUCCESS) @@ -333,13 +333,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } if (reference_value > min) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: reference_value=%g min_value=%g diff=%g", reference_value, min, reference_value - min); + "CCSDS %s: reference_value=%g min_value=%g diff=%g", __func__, reference_value, min, reference_value - min); DebugAssert(reference_value <= min); return GRIB_INTERNAL_ERROR; } @@ -376,7 +376,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } d = grib_power(decimal_scale_factor, 10); @@ -449,8 +449,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (hand->context->debug) print_aec_stream_info(&strm, "pack_double"); if ((err = aec_buffer_encode(&strm)) != AEC_OK) { - grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS pack_double: aec_buffer_encode error %d (%s)\n", - err, aec_get_error_message(err)); + grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_encode error %d (%s)", + __func__, err, aec_get_error_message(err)); err = GRIB_ENCODING_ERROR; goto cleanup; } @@ -567,9 +567,9 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if (hand->context->debug) print_aec_stream_info(&strm, "unpack_*"); if ((err = aec_buffer_decode(&strm)) != AEC_OK) { - grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_decode error %d (%s)\n", + grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_decode error %d (%s)", __func__, err, aec_get_error_message(err)); - err = GRIB_ENCODING_ERROR; + err = GRIB_DECODING_ERROR; goto cleanup; }