mirror of https://github.com/ecmwf/eccodes.git
Add extra error codes
This commit is contained in:
parent
3d513738c8
commit
bd62688189
|
@ -1,3 +1,14 @@
|
|||
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
|
||||
integer, parameter,public :: CODES_NAME_MISMATCH = -75
|
||||
integer, parameter,public :: CODES_COUNT_MISMATCH = -74
|
||||
integer, parameter,public :: CODES_OFFSET_MISMATCH = -73
|
||||
integer, parameter,public :: CODES_STRING_VALUE_MISMATCH = -72
|
||||
integer, parameter,public :: CODES_BYTE_VALUE_MISMATCH = -71
|
||||
integer, parameter,public :: CODES_LONG_VALUE_MISMATCH = -70
|
||||
integer, parameter,public :: CODES_DOUBLE_VALUE_MISMATCH = -69
|
||||
integer, parameter,public :: CODES_VALUE_MISMATCH = -68
|
||||
integer, parameter,public :: CODES_FUNCTIONALITY_NOT_ENABLED = -67
|
||||
integer, parameter,public :: CODES_WRONG_BITMAP_SIZE = -66
|
||||
integer, parameter,public :: CODES_OUT_OF_RANGE = -65
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
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
|
||||
integer, parameter,public :: GRIB_NAME_MISMATCH = -75
|
||||
integer, parameter,public :: GRIB_COUNT_MISMATCH = -74
|
||||
integer, parameter,public :: GRIB_OFFSET_MISMATCH = -73
|
||||
integer, parameter,public :: GRIB_STRING_VALUE_MISMATCH = -72
|
||||
integer, parameter,public :: GRIB_BYTE_VALUE_MISMATCH = -71
|
||||
integer, parameter,public :: GRIB_LONG_VALUE_MISMATCH = -70
|
||||
integer, parameter,public :: GRIB_DOUBLE_VALUE_MISMATCH = -69
|
||||
integer, parameter,public :: GRIB_VALUE_MISMATCH = -68
|
||||
integer, parameter,public :: GRIB_FUNCTIONALITY_NOT_ENABLED = -67
|
||||
integer, parameter,public :: GRIB_WRONG_BITMAP_SIZE = -66
|
||||
integer, parameter,public :: GRIB_OUT_OF_RANGE = -65
|
||||
|
|
|
@ -1596,5 +1596,27 @@ Error codes returned by the eccodes functions.
|
|||
#define CODES_WRONG_BITMAP_SIZE GRIB_WRONG_BITMAP_SIZE
|
||||
/** Functionality not enabled */
|
||||
#define CODES_FUNCTIONALITY_NOT_ENABLED GRIB_FUNCTIONALITY_NOT_ENABLED
|
||||
/** Value mismatch */
|
||||
#define CODES_VALUE_MISMATCH GRIB_VALUE_MISMATCH
|
||||
/** Double values are different */
|
||||
#define CODES_DOUBLE_VALUE_MISMATCH GRIB_DOUBLE_VALUE_MISMATCH
|
||||
/** Long values are different */
|
||||
#define CODES_LONG_VALUE_MISMATCH GRIB_LONG_VALUE_MISMATCH
|
||||
/** Byte values are different */
|
||||
#define CODES_BYTE_VALUE_MISMATCH GRIB_BYTE_VALUE_MISMATCH
|
||||
/** String values are different */
|
||||
#define CODES_STRING_VALUE_MISMATCH GRIB_STRING_VALUE_MISMATCH
|
||||
/** Offset mismatch */
|
||||
#define CODES_OFFSET_MISMATCH GRIB_OFFSET_MISMATCH
|
||||
/** Count mismatch */
|
||||
#define CODES_COUNT_MISMATCH GRIB_COUNT_MISMATCH
|
||||
/** Name mismatch */
|
||||
#define CODES_NAME_MISMATCH GRIB_NAME_MISMATCH
|
||||
/** Type mismatch */
|
||||
#define CODES_TYPE_MISMATCH GRIB_TYPE_MISMATCH
|
||||
/** Type and value mismatch */
|
||||
#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
|
||||
/*! @}*/
|
||||
#endif
|
||||
|
|
|
@ -8,8 +8,6 @@ grib_errors.cc : grib_errors.txt errors.pl
|
|||
cmp -s eccodes.h eccodes.h.new || (mv eccodes.h.new eccodes.h)
|
||||
cmp -s ../fortran/grib_api_constants.h grib_api_constants.h.new || (mv grib_api_constants.h.new ../fortran/grib_api_constants.h)
|
||||
cmp -s ../fortran/eccodes_constants.h eccodes_constants.h.new || (mv eccodes_constants.h.new ../fortran/eccodes_constants.h)
|
||||
cmp -s ../python/grib_errors.h grib_errors.h.new || (mv grib_errors.h.new ../python/grib_errors.h)
|
||||
cmp -s ../python/gribapi/errors.py errors.py.new || (mv errors.py.new ../python/gribapi/errors.py)
|
||||
|
||||
|
||||
proto:;-chmod +w eccodes_prototypes.h; mkptypes -A $(libeccodes_la_prototypes) $(libeccodes_extra_prototypes) > temp && mv temp eccodes_prototypes.h;rm -f temp
|
||||
|
|
|
@ -1790,5 +1790,27 @@ Error codes returned by the grib_api functions.
|
|||
#define GRIB_WRONG_BITMAP_SIZE -66
|
||||
/** Functionality not enabled */
|
||||
#define GRIB_FUNCTIONALITY_NOT_ENABLED -67
|
||||
/** Value mismatch */
|
||||
#define GRIB_VALUE_MISMATCH -68
|
||||
/** Double values are different */
|
||||
#define GRIB_DOUBLE_VALUE_MISMATCH -69
|
||||
/** Long values are different */
|
||||
#define GRIB_LONG_VALUE_MISMATCH -70
|
||||
/** Byte values are different */
|
||||
#define GRIB_BYTE_VALUE_MISMATCH -71
|
||||
/** String values are different */
|
||||
#define GRIB_STRING_VALUE_MISMATCH -72
|
||||
/** Offset mismatch */
|
||||
#define GRIB_OFFSET_MISMATCH -73
|
||||
/** Count mismatch */
|
||||
#define GRIB_COUNT_MISMATCH -74
|
||||
/** Name mismatch */
|
||||
#define GRIB_NAME_MISMATCH -75
|
||||
/** Type mismatch */
|
||||
#define GRIB_TYPE_MISMATCH -76
|
||||
/** Type and value mismatch */
|
||||
#define GRIB_TYPE_AND_VALUE_MISMATCH -77
|
||||
/** Unable to compare accessors */
|
||||
#define GRIB_UNABLE_TO_COMPARE_ACCESSORS -78
|
||||
/*! @}*/
|
||||
#endif
|
||||
|
|
|
@ -1564,30 +1564,6 @@ typedef struct j2k_encode_helper
|
|||
/* This part is automatically generated by ./errors.pl, do not edit */
|
||||
#ifndef grib_errors_internal_H
|
||||
#define grib_errors_internal_H
|
||||
/** Value mismatch */
|
||||
#define GRIB_VALUE_MISMATCH 1
|
||||
/** double values are different */
|
||||
#define GRIB_DOUBLE_VALUE_MISMATCH 2
|
||||
/** long values are different */
|
||||
#define GRIB_LONG_VALUE_MISMATCH 3
|
||||
/** byte values are different */
|
||||
#define GRIB_BYTE_VALUE_MISMATCH 4
|
||||
/** string values are different */
|
||||
#define GRIB_STRING_VALUE_MISMATCH 5
|
||||
/** Offset mismatch */
|
||||
#define GRIB_OFFSET_MISMATCH 6
|
||||
/** Count mismatch */
|
||||
#define GRIB_COUNT_MISMATCH 7
|
||||
/** Name mismatch */
|
||||
#define GRIB_NAME_MISMATCH 8
|
||||
/** Type mismatch */
|
||||
#define GRIB_TYPE_MISMATCH 9
|
||||
/** Type and value mismatch */
|
||||
#define GRIB_TYPE_AND_VALUE_MISMATCH 10
|
||||
/** Unable to compare accessors */
|
||||
#define GRIB_UNABLE_TO_COMPARE_ACCESSORS 11
|
||||
/** Unable to reset iterator */
|
||||
#define GRIB_UNABLE_TO_RESET_ITERATOR 12
|
||||
/** Assertion failure */
|
||||
#define GRIB_ASSERTION_FAILURE 13
|
||||
#endif
|
||||
|
|
|
@ -80,19 +80,18 @@ static const char *errors[] = {
|
|||
"Value out of coding range", /* -65 GRIB_OUT_OF_RANGE */
|
||||
"Size of bitmap is incorrect", /* -66 GRIB_WRONG_BITMAP_SIZE */
|
||||
"Functionality not enabled", /* -67 GRIB_FUNCTIONALITY_NOT_ENABLED */
|
||||
"Value mismatch", /* 1 GRIB_VALUE_MISMATCH */
|
||||
"double values are different", /* 2 GRIB_DOUBLE_VALUE_MISMATCH */
|
||||
"long values are different", /* 3 GRIB_LONG_VALUE_MISMATCH */
|
||||
"byte values are different", /* 4 GRIB_BYTE_VALUE_MISMATCH */
|
||||
"string values are different", /* 5 GRIB_STRING_VALUE_MISMATCH */
|
||||
"Offset mismatch", /* 6 GRIB_OFFSET_MISMATCH */
|
||||
"Count mismatch", /* 7 GRIB_COUNT_MISMATCH */
|
||||
"Name mismatch", /* 8 GRIB_NAME_MISMATCH */
|
||||
"Type mismatch", /* 9 GRIB_TYPE_MISMATCH */
|
||||
"Type and value mismatch", /* 10 GRIB_TYPE_AND_VALUE_MISMATCH */
|
||||
"Unable to compare accessors", /* 11 GRIB_UNABLE_TO_COMPARE_ACCESSORS */
|
||||
"Unable to reset iterator", /* 12 GRIB_UNABLE_TO_RESET_ITERATOR */
|
||||
"Assertion failure", /* 13 GRIB_ASSERTION_FAILURE */
|
||||
"Value mismatch", /* -68 GRIB_VALUE_MISMATCH */
|
||||
"Double values are different", /* -69 GRIB_DOUBLE_VALUE_MISMATCH */
|
||||
"Long values are different", /* -70 GRIB_LONG_VALUE_MISMATCH */
|
||||
"Byte values are different", /* -71 GRIB_BYTE_VALUE_MISMATCH */
|
||||
"String values are different", /* -72 GRIB_STRING_VALUE_MISMATCH */
|
||||
"Offset mismatch", /* -73 GRIB_OFFSET_MISMATCH */
|
||||
"Count mismatch", /* -74 GRIB_COUNT_MISMATCH */
|
||||
"Name mismatch", /* -75 GRIB_NAME_MISMATCH */
|
||||
"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 */
|
||||
};
|
||||
|
||||
#define NUMBER(a) sizeof(a)/sizeof(a[0])
|
||||
|
|
|
@ -73,3 +73,14 @@ GRIB_UNSUPPORTED_EDITION Edition not supported.
|
|||
GRIB_OUT_OF_RANGE Value out of coding range
|
||||
GRIB_WRONG_BITMAP_SIZE Size of bitmap is incorrect
|
||||
GRIB_FUNCTIONALITY_NOT_ENABLED Functionality not enabled
|
||||
GRIB_VALUE_MISMATCH Value mismatch
|
||||
GRIB_DOUBLE_VALUE_MISMATCH Double values are different
|
||||
GRIB_LONG_VALUE_MISMATCH Long values are different
|
||||
GRIB_BYTE_VALUE_MISMATCH Byte values are different
|
||||
GRIB_STRING_VALUE_MISMATCH String values are different
|
||||
GRIB_OFFSET_MISMATCH Offset mismatch
|
||||
GRIB_COUNT_MISMATCH Count mismatch
|
||||
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
|
||||
|
|
|
@ -1,14 +1 @@
|
|||
/* accessors compare */
|
||||
GRIB_VALUE_MISMATCH Value mismatch
|
||||
GRIB_DOUBLE_VALUE_MISMATCH double values are different
|
||||
GRIB_LONG_VALUE_MISMATCH long values are different
|
||||
GRIB_BYTE_VALUE_MISMATCH byte values are different
|
||||
GRIB_STRING_VALUE_MISMATCH string values are different
|
||||
GRIB_OFFSET_MISMATCH Offset mismatch
|
||||
GRIB_COUNT_MISMATCH Count mismatch
|
||||
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_UNABLE_TO_RESET_ITERATOR Unable to reset iterator
|
||||
GRIB_ASSERTION_FAILURE Assertion failure
|
||||
|
|
Loading…
Reference in New Issue