mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-23 16:20:57 +08:00
[svn-r12109] Purpose: Backward compatibility support
Description: Added H5E_NONE_MAJOR and H5E_NONE_MINOR as a major and minor error message. Their messages are "no error", but because the old library had them, they're added in for backward compatibility. Platforms tested: fuss - simple change.
This commit is contained in:
parent
2d6bcc3212
commit
6e8ba9561d
@ -47,6 +47,7 @@ hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */
|
||||
hid_t H5E_ERROR_g = FAIL; /* Error API */
|
||||
hid_t H5E_PLINE_g = FAIL; /* Data filters */
|
||||
hid_t H5E_CACHE_g = FAIL; /* Object cache */
|
||||
hid_t H5E_NONE_MAJOR_g = FAIL; /* No error, only for backward compatibility */
|
||||
|
||||
/* Minor error IDs */
|
||||
|
||||
@ -181,4 +182,7 @@ hid_t H5E_BADVALUE_g = FAIL; /* Bad value */
|
||||
hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */
|
||||
hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */
|
||||
|
||||
/* No error, for backward compatibility */
|
||||
hid_t H5E_NONE_MINOR_g = FAIL;
|
||||
|
||||
#endif /* H5Edefin_H */
|
||||
|
@ -158,6 +158,11 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
|
||||
if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg))<0)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
|
||||
assert(H5E_NONE_MAJOR_g==(-1));
|
||||
if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
|
||||
if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg))<0)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
|
||||
|
||||
/*********************/
|
||||
/* Minor error codes */
|
||||
@ -675,4 +680,11 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL)
|
||||
if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg))<0)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
|
||||
|
||||
/* No error, only for backward compatibility */
|
||||
assert(H5E_NONE_MINOR_g==(-1));
|
||||
if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
|
||||
if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg))<0)
|
||||
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
|
||||
|
||||
#endif /* H5Einit_H */
|
||||
|
@ -50,6 +50,7 @@
|
||||
#define H5E_ERROR (H5OPEN H5E_ERROR_g)
|
||||
#define H5E_PLINE (H5OPEN H5E_PLINE_g)
|
||||
#define H5E_CACHE (H5OPEN H5E_CACHE_g)
|
||||
#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g)
|
||||
H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */
|
||||
H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
|
||||
H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */
|
||||
@ -77,6 +78,7 @@ H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */
|
||||
H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */
|
||||
H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */
|
||||
H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */
|
||||
H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */
|
||||
|
||||
/*********************/
|
||||
/* Minor error codes */
|
||||
@ -308,4 +310,8 @@ H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */
|
||||
H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */
|
||||
H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */
|
||||
|
||||
/* No error, only for backward compatibility */
|
||||
#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g)
|
||||
H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error, only for backward compatibility */
|
||||
|
||||
#endif /* H5Epubgen_H */
|
||||
|
@ -47,7 +47,8 @@ H5E_TST_g=
|
||||
H5E_ARGS_g=
|
||||
H5E_ERROR_g=
|
||||
H5E_PLINE_g=
|
||||
H5E_CACHE_g= (-1);
|
||||
H5E_CACHE_g=
|
||||
H5E_NONE_MAJOR_g=(-1);
|
||||
|
||||
/* Reset minor error IDs */
|
||||
|
||||
@ -181,6 +182,9 @@ H5E_BADVALUE_g=
|
||||
|
||||
/* Datatype conversion errors */
|
||||
H5E_CANTCONVERT_g=
|
||||
H5E_BADSIZE_g= (-1);
|
||||
H5E_BADSIZE_g=
|
||||
|
||||
/* No error, only for backward compatibility */
|
||||
H5E_NONE_MINOR_g= (-1);
|
||||
|
||||
#endif /* H5Eterm_H */
|
||||
|
Loading…
Reference in New Issue
Block a user