diff --git a/fortran/eccodes_constants.h b/fortran/eccodes_constants.h index 72383e471..736e3feab 100644 --- a/fortran/eccodes_constants.h +++ b/fortran/eccodes_constants.h @@ -1,3 +1,4 @@ + integer, parameter,public :: CODES_ASSERTION_FAILURE = -79 integer, parameter,public :: CODES_UNABLE_TO_COMPARE_ACCESSORS = -78 integer, parameter,public :: CODES_TYPE_AND_VALUE_MISMATCH = -77 integer, parameter,public :: CODES_TYPE_MISMATCH = -76 diff --git a/fortran/grib_api_constants.h b/fortran/grib_api_constants.h index 0644110a9..f8ea7a226 100644 --- a/fortran/grib_api_constants.h +++ b/fortran/grib_api_constants.h @@ -1,3 +1,4 @@ + integer, parameter,public :: GRIB_ASSERTION_FAILURE = -79 integer, parameter,public :: GRIB_UNABLE_TO_COMPARE_ACCESSORS = -78 integer, parameter,public :: GRIB_TYPE_AND_VALUE_MISMATCH = -77 integer, parameter,public :: GRIB_TYPE_MISMATCH = -76 diff --git a/src/eccodes.h b/src/eccodes.h index 9509afe10..bded1a49c 100644 --- a/src/eccodes.h +++ b/src/eccodes.h @@ -1618,5 +1618,7 @@ Error codes returned by the eccodes functions. #define CODES_TYPE_AND_VALUE_MISMATCH GRIB_TYPE_AND_VALUE_MISMATCH /** Unable to compare accessors */ #define CODES_UNABLE_TO_COMPARE_ACCESSORS GRIB_UNABLE_TO_COMPARE_ACCESSORS +/** Assertion failure */ +#define CODES_ASSERTION_FAILURE GRIB_ASSERTION_FAILURE /*! @}*/ #endif diff --git a/src/grib_api.h b/src/grib_api.h index 7c830e495..cc0ddb5cc 100644 --- a/src/grib_api.h +++ b/src/grib_api.h @@ -1812,5 +1812,7 @@ Error codes returned by the grib_api functions. #define GRIB_TYPE_AND_VALUE_MISMATCH -77 /** Unable to compare accessors */ #define GRIB_UNABLE_TO_COMPARE_ACCESSORS -78 +/** Assertion failure */ +#define GRIB_ASSERTION_FAILURE -79 /*! @}*/ #endif diff --git a/src/grib_api_internal.h b/src/grib_api_internal.h index 5a39ca0ba..d47de3a9b 100644 --- a/src/grib_api_internal.h +++ b/src/grib_api_internal.h @@ -1562,9 +1562,3 @@ typedef struct j2k_encode_helper #endif -/* This part is automatically generated by ./errors.pl, do not edit */ -#ifndef grib_errors_internal_H -#define grib_errors_internal_H -/** Assertion failure */ -#define GRIB_ASSERTION_FAILURE 13 -#endif diff --git a/src/grib_errors.cc b/src/grib_errors.cc index 97b384c83..ac61a6154 100644 --- a/src/grib_errors.cc +++ b/src/grib_errors.cc @@ -91,7 +91,7 @@ static const char *errors[] = { "Type mismatch", /* -76 GRIB_TYPE_MISMATCH */ "Type and value mismatch", /* -77 GRIB_TYPE_AND_VALUE_MISMATCH */ "Unable to compare accessors", /* -78 GRIB_UNABLE_TO_COMPARE_ACCESSORS */ -"Assertion failure", /* 2 GRIB_ASSERTION_FAILURE */ +"Assertion failure", /* -79 GRIB_ASSERTION_FAILURE */ }; #define NUMBER(a) sizeof(a)/sizeof(a[0]) diff --git a/src/grib_errors.txt b/src/grib_errors.txt index 3d592da57..6019f6601 100644 --- a/src/grib_errors.txt +++ b/src/grib_errors.txt @@ -84,3 +84,4 @@ GRIB_NAME_MISMATCH Name mismatch GRIB_TYPE_MISMATCH Type mismatch GRIB_TYPE_AND_VALUE_MISMATCH Type and value mismatch GRIB_UNABLE_TO_COMPARE_ACCESSORS Unable to compare accessors +GRIB_ASSERTION_FAILURE Assertion failure diff --git a/src/grib_errors_internal.txt b/src/grib_errors_internal.txt index 3f88945d1..e69de29bb 100644 --- a/src/grib_errors_internal.txt +++ b/src/grib_errors_internal.txt @@ -1 +0,0 @@ -GRIB_ASSERTION_FAILURE Assertion failure