mirror of https://github.com/ecmwf/eccodes.git
Examples: print error rather than assert
This commit is contained in:
parent
d1ae16ae15
commit
9e52edd4a3
|
@ -62,8 +62,10 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
is_missing = codes_is_missing(h, "relativeHumidity", &err);
|
is_missing = codes_is_missing(h, "relativeHumidity", &err);
|
||||||
assert(!err);
|
if (err || !is_missing) {
|
||||||
assert(is_missing == 1);
|
fprintf(stderr, "Error: relativeHumidity should be 'missing'\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set some other keys to be missing */
|
/* Set some other keys to be missing */
|
||||||
CODES_CHECK(codes_set_missing(h, "blockNumber"), 0);
|
CODES_CHECK(codes_set_missing(h, "blockNumber"), 0);
|
||||||
|
|
Loading…
Reference in New Issue