summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-30 12:50:39 (GMT)
committerGitHub <noreply@github.com>2020-11-30 12:50:39 (GMT)
commitc256612e0950f3389249aa3a151d66ce01704d89 (patch)
tree2b87801fba6d5d7beef06588a6631b764594183b /src/H5I.c
parenta6e3d226043eb81aac3c315c6fd9262a036f9f1d (diff)
downloadhdf5-c256612e0950f3389249aa3a151d66ce01704d89.zip
hdf5-c256612e0950f3389249aa3a151d66ce01704d89.tar.gz
hdf5-c256612e0950f3389249aa3a151d66ce01704d89.tar.bz2
Replace H5E_ATOM major error category with H5E_ID (#121)
* Renames H5I_ATOM to H5I_ID, among other related changes * Java has been updated. * Fortran is failing on my VM, even though I don't touch that. * Adds a RELEASE.txt note for H5E_ATOM to H5E_ID changes * Fixes typos in comments
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/H5I.c b/src/H5I.c
index fba9fc2..90a7479 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -123,12 +123,12 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I
/* Verify that we found a type to give out */
if (done == FALSE)
- HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded")
+ HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded")
}
/* Allocate new ID class */
if (NULL == (cls = H5MM_calloc(sizeof(H5I_class_t))))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed")
+ HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed")
/* Initialize class fields */
cls->type = new_type;
@@ -138,7 +138,7 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I
/* Register the new ID class */
if (H5I_register_type(cls) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, H5I_BADID, "can't initialize ID class")
+ HGOTO_ERROR(H5E_ID, H5E_CANTINIT, H5I_BADID, "can't initialize ID class")
/* Set return value */
ret_value = new_type;
@@ -172,7 +172,7 @@ H5Itype_exists(H5I_type_t type)
/* Validate parameter */
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type")
if (type <= H5I_BADID || (int)type >= H5I_next_type_g)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
@@ -208,7 +208,7 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members)
H5TRACE2("e", "It*h", type, num_members);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type")
/* Validate parameters. This needs to be done here, instead of letting
* the private interface handle it, because the public interface throws
@@ -223,7 +223,7 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members)
int64_t members;
if ((members = H5I_nmembers(type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTCOUNT, FAIL, "can't compute number of members")
+ HGOTO_ERROR(H5E_ID, H5E_CANTCOUNT, FAIL, "can't compute number of members")
H5_CHECKED_ASSIGN(*num_members, hsize_t, members, int64_t);
}
@@ -256,7 +256,7 @@ H5Iclear_type(H5I_type_t type, hbool_t force)
H5TRACE2("e", "Itb", type, force);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type")
ret_value = H5I_clear_type(type, force, TRUE);
@@ -289,7 +289,7 @@ H5Idestroy_type(H5I_type_t type)
H5TRACE1("e", "It", type);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type")
ret_value = H5I__destroy_type(type);
@@ -316,7 +316,7 @@ H5Iregister(H5I_type_t type, const void *object)
H5TRACE2("i", "It*x", type, object);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, H5I_INVALID_HID, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "cannot call public function on library type")
ret_value = H5I_register(type, object, TRUE);
@@ -347,9 +347,9 @@ H5Iobject_verify(hid_t id, H5I_type_t type)
/* Validate parameters */
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type")
if (type < 1 || (int)type >= H5I_next_type_g)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "identifier has invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "identifier has invalid type")
ret_value = H5I_object_verify(id, type);
@@ -415,7 +415,7 @@ H5Iremove_verify(hid_t id, H5I_type_t type)
H5TRACE2("*x", "iIt", id, type);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type")
/* Remove the id */
ret_value = H5I__remove_verify(id, type);
@@ -449,11 +449,11 @@ H5Idec_ref(hid_t id)
/* Check arguments */
if (id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID")
/* Do actual decrement operation */
if ((ret_value = H5I_dec_app_ref(id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count")
done:
FUNC_LEAVE_API(ret_value)
@@ -479,11 +479,11 @@ H5Iinc_ref(hid_t id)
/* Check arguments */
if (id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID")
/* Do actual increment operation */
if ((ret_value = H5I_inc_ref(id, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, (-1), "can't increment ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID ref count")
done:
FUNC_LEAVE_API(ret_value)
@@ -509,11 +509,11 @@ H5Iget_ref(hid_t id)
/* Check arguments */
if (id < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID")
/* Do actual retrieve operation */
if ((ret_value = H5I_get_ref(id, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't get ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID ref count")
done:
FUNC_LEAVE_API(ret_value)
@@ -539,13 +539,13 @@ H5Iinc_type_ref(H5I_type_t type)
/* Check arguments */
if (type <= 0 || (int)type >= H5I_next_type_g)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID type")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type")
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type")
/* Do actual increment operation */
if ((ret_value = H5I__inc_type_ref(type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, (-1), "can't increment ID type ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID type ref count")
done:
FUNC_LEAVE_API(ret_value)
@@ -584,7 +584,7 @@ H5Idec_type_ref(H5I_type_t type)
H5TRACE1("e", "It", type);
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type")
ret_value = H5I_dec_type_ref(type);
@@ -612,13 +612,13 @@ H5Iget_type_ref(H5I_type_t type)
/* Check arguments */
if (type <= 0 || (int)type >= H5I_next_type_g)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "invalid ID type")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type")
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type")
/* Do actual retrieve operation */
if ((ret_value = H5I__get_type_ref(type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't get ID type ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID type ref count")
done:
FUNC_LEAVE_API(ret_value)
@@ -718,7 +718,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
/* Check arguments */
if (H5I_IS_LIB_TYPE(type))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type")
/* Set up udata struct */
udata.app_cb = func;
@@ -816,7 +816,7 @@ H5Iiterate(H5I_type_t type, H5I_iterate_func_t op, void *op_data)
* here, as we can't do anything with it without revising the API.
*/
if ((ret_value = H5I_iterate(type, H5I__iterate_pub_cb, &int_udata, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "can't iterate over ids")
+ HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "can't iterate over ids")
done:
FUNC_LEAVE_API(ret_value)
@@ -853,11 +853,11 @@ H5Iget_file_id(hid_t obj_id)
/* Get the VOL object */
if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
+ HGOTO_ERROR(H5E_ID, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Get the file ID */
if ((ret_value = H5F_get_file_id(vol_obj, type, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID")
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID")
}
else
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "not an ID of a file object")
@@ -899,7 +899,7 @@ H5Iget_name(hid_t id, char *name /*out*/, size_t size)
/* Get the object pointer */
if (NULL == (vol_obj = H5VL_vol_object(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
+ HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier")
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_SELF;
@@ -908,7 +908,7 @@ H5Iget_name(hid_t id, char *name /*out*/, size_t size)
/* Retrieve object's name */
if (H5VL_object_get(vol_obj, &loc_params, H5VL_OBJECT_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
&ret_value, name, size) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name")
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object name")
done:
FUNC_LEAVE_API(ret_value)