mirror of https://github.com/ecmwf/eccodes.git
Turn assert into proper error (unreadable message)
This commit is contained in:
parent
0ef0fce941
commit
4b2f8bcb46
|
@ -448,6 +448,7 @@ grib_handle* grib_handle_new_from_message(grib_context* c, const void* data, siz
|
||||||
gl = grib_new_handle(c);
|
gl = grib_new_handle(c);
|
||||||
gl->product_kind = PRODUCT_GRIB; /* See ECC-480 */
|
gl->product_kind = PRODUCT_GRIB; /* See ECC-480 */
|
||||||
h = grib_handle_create(gl, c, data, buflen);
|
h = grib_handle_create(gl, c, data, buflen);
|
||||||
|
if (!h) return NULL;
|
||||||
|
|
||||||
/* See ECC-448 */
|
/* See ECC-448 */
|
||||||
if (determine_product_kind(h, &product_kind) == GRIB_SUCCESS) {
|
if (determine_product_kind(h, &product_kind) == GRIB_SUCCESS) {
|
||||||
|
|
Loading…
Reference in New Issue