summaryrefslogtreecommitdiffstats
path: root/src/H5Einit.h
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-03-16 21:29:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-03-16 21:29:23 (GMT)
commit6e8ba9561dff2585c5078a01c4d6db0f790ba1fb (patch)
treeaa7fea468eb89bb452239653ca0dd71259cecf21 /src/H5Einit.h
parent2d6bcc32129ebe80b7962190affc0d7f18a19578 (diff)
downloadhdf5-6e8ba9561dff2585c5078a01c4d6db0f790ba1fb.zip
hdf5-6e8ba9561dff2585c5078a01c4d6db0f790ba1fb.tar.gz
hdf5-6e8ba9561dff2585c5078a01c4d6db0f790ba1fb.tar.bz2
[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.
Diffstat (limited to 'src/H5Einit.h')
-rw-r--r--src/H5Einit.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5Einit.h b/src/H5Einit.h
index 2c216da..0b7610f 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.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 */