Skip to content

Commit 7aef2d8

Browse files
committed
Error messages
1 parent 2c26f89 commit 7aef2d8

10 files changed

+15
-15
lines changed

src/grib_accessor_class_bufr_elements_table.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err)
207207
}
208208

209209
if (!filename) {
210-
grib_context_log(c, GRIB_LOG_ERROR, "unable to find definition file %s", self->dictionary);
210+
grib_context_log(c, GRIB_LOG_ERROR, "Unable to find definition file %s", self->dictionary);
211211
if (strlen(masterRecomposed) > 0) grib_context_log(c, GRIB_LOG_DEBUG,"master path=%s", masterRecomposed);
212212
if (strlen(localRecomposed) > 0) grib_context_log(c, GRIB_LOG_DEBUG, "local path=%s", localRecomposed);
213213
*err = GRIB_FILE_NOT_FOUND;

src/grib_accessor_class_data_dummy_field.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int value_count(grib_accessor* a, long* numberOfPoints)
217217
*numberOfPoints = 0;
218218

219219
if ((err = grib_get_long_internal(grib_handle_of_accessor(a), self->numberOfPoints, numberOfPoints)) != GRIB_SUCCESS) {
220-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to get count of %s (%s)", a->name, grib_get_error_message(err));
220+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to get count of %s (%s)", a->name, grib_get_error_message(err));
221221
}
222222

223223
return err;

src/grib_accessor_class_data_g1simple_packing.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int pack_double(grib_accessor* a, const double* cval, size_t* len)
256256
return GRIB_SUCCESS;
257257
break;
258258
case GRIB_INVALID_BPV:
259-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to compute packing parameters. Invalid bits per value");
259+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to compute packing parameters. Invalid bits per value");
260260
return ret;
261261
case GRIB_SUCCESS:
262262
break;

src/grib_accessor_class_data_simple_packing.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
640640
if (max == min) {
641641
int large_constant_fields = 0;
642642
if (grib_get_nearest_smaller_value(gh, self->reference_value, val[0], &reference_value) != GRIB_SUCCESS) {
643-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
643+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
644644
return GRIB_INTERNAL_ERROR;
645645
}
646646
if ((err = grib_set_double_internal(gh, self->reference_value, reference_value)) != GRIB_SUCCESS)
@@ -722,7 +722,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
722722
return err;
723723
if (grib_get_nearest_smaller_value(gh, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
724724
grib_context_log(a->context, GRIB_LOG_ERROR,
725-
"unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
725+
"Unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
726726
return GRIB_INTERNAL_ERROR;
727727
}
728728
/* divisor=1; */
@@ -737,7 +737,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
737737
/* divisor=1; */
738738
if (grib_get_nearest_smaller_value(gh, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
739739
grib_context_log(a->context, GRIB_LOG_ERROR,
740-
"unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
740+
"Unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
741741
return GRIB_INTERNAL_ERROR;
742742
}
743743
}
@@ -776,7 +776,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
776776

777777
if (grib_get_nearest_smaller_value(gh, self->reference_value,
778778
min, &reference_value) != GRIB_SUCCESS) {
779-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
779+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
780780
return GRIB_INTERNAL_ERROR;
781781
}
782782

src/grib_accessor_class_dictionary.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static grib_trie* load_dictionary(grib_accessor* a, int* err)
179179
}
180180

181181
if (!filename) {
182-
grib_context_log(c, GRIB_LOG_ERROR, "unable to find def file %s", self->dictionary);
182+
grib_context_log(c, GRIB_LOG_ERROR, "Unable to find def file %s", self->dictionary);
183183
*err = GRIB_FILE_NOT_FOUND;
184184
return NULL;
185185
}

src/grib_accessor_class_gen.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static int pack_expression(grib_accessor* a, grib_expression* e)
424424
len = 1;
425425
ret = grib_expression_evaluate_double(hand, e, &dval);
426426
if (ret != GRIB_SUCCESS) {
427-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to set %s as double (from %s)",
427+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to set %s as double (from %s)",
428428
a->name, e->cclass->name);
429429
return ret;
430430
}
@@ -438,7 +438,7 @@ static int pack_expression(grib_accessor* a, grib_expression* e)
438438
len = sizeof(tmp);
439439
cval = grib_expression_evaluate_string(hand, e, tmp, &len, &ret);
440440
if (ret != GRIB_SUCCESS) {
441-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to set %s as string (from %s)",
441+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to set %s as string (from %s)",
442442
a->name, e->cclass->name);
443443
return ret;
444444
}

src/grib_accessor_class_julian_date.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ static int pack_expression(grib_accessor* a, grib_expression* e)
433433
len = 1;
434434
ret = grib_expression_evaluate_long(hand, e, &lval);
435435
if (ret != GRIB_SUCCESS) {
436-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to set %s as long", a->name);
436+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to set %s as long", a->name);
437437
return ret;
438438
}
439439
/*if (hand->context->debug)
@@ -454,7 +454,7 @@ static int pack_expression(grib_accessor* a, grib_expression* e)
454454
len = sizeof(tmp);
455455
cval = grib_expression_evaluate_string(hand, e, tmp, &len, &ret);
456456
if (ret != GRIB_SUCCESS) {
457-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to set %s as string", a->name);
457+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to set %s as string", a->name);
458458
return ret;
459459
}
460460
len = strlen(cval);

src/grib_accessor_class_raw.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg)
124124
e = grib_arguments_get_expression(hand, arg, n++);
125125
err = grib_expression_evaluate_long(hand, e, &(self->relativeOffset));
126126
if (err)
127-
grib_context_log(hand->context, GRIB_LOG_ERROR, "unable to evaluate relativeOffset");
127+
grib_context_log(hand->context, GRIB_LOG_ERROR, "Unable to evaluate relativeOffset");
128128

129129
grib_get_long(hand, self->sectionLength, &sectionLength);
130130

src/grib_accessor_class_variable.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void init(grib_accessor* a, const long length, grib_arguments* args)
160160
len = sizeof(tmp);
161161
p = grib_expression_evaluate_string(hand, expression, tmp, &len, &ret);
162162
if (ret != GRIB_SUCCESS) {
163-
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to evaluate %s as string: %s",
163+
grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to evaluate %s as string: %s",
164164
a->name, grib_get_error_message(ret));
165165
return;
166166
}

tests/grib_ecc-1170.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set -e
3030
[ $status -ne 0 ]
3131

3232
#cat $tempErr
33-
grep -q "unable to set values as double" $tempErr
33+
grep -q "Unable to set values as double" $tempErr
3434

3535

3636
# Clean up

0 commit comments

Comments
 (0)