summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5rImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5rImp.c')
-rw-r--r--java/src/jni/h5rImp.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c
index 4ad5d5f..def27f4 100644
--- a/java/src/jni/h5rImp.c
+++ b/java/src/jni/h5rImp.c
@@ -51,7 +51,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1object
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_object: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_object: failed to allocate reference buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_object: failed to allocate reference buffer");
if ((status = H5Rcreate_object((hid_t)loc_id, refName, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -94,7 +94,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1region
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_region: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_region: failed to allocate reference buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_region: failed to allocate reference buffer");
if ((status = H5Rcreate_region((hid_t)loc_id, refName, space_id, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -141,7 +141,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1attr
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_attr: reference name not pinned");
if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate reference buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate reference buffer");
if ((status = H5Rcreate_attr((hid_t)loc_id, refName, attrName, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -315,7 +315,7 @@ Java_hdf_hdf5lib_H5_H5Rcopy
PIN_BYTE_ARRAY(ENVONLY, src_ref, src_refBuf, &isCopy, "H5Rcopy: src reference buffer not pinned");
if (NULL == (dst_refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate dst reference buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate dst reference buffer");
if ((status = H5Rcopy((const H5R_ref_t *)src_refBuf, (const H5R_ref_t *)dst_refBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -452,7 +452,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Rget_1obj_1type3
(JNIEnv *env, jclass clss, jbyteArray ref, jlong rapl_id)
{
- H5O_type_t object_info;
+ H5O_type_t object_info = -1;
jboolean isCopy;
jbyte *refBuf = NULL;
int retVal = -1;
@@ -505,7 +505,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1file_1name
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_file_name: malloc failed");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_file_name: malloc failed");
if ((check_size = H5Rget_file_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -551,7 +551,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1obj_1name
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_obj_name: malloc failed");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_obj_name: malloc failed");
if ((check_size = H5Rget_obj_name((const H5R_ref_t *)refBuf, (hid_t)rapl_id, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -597,7 +597,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1attr_1name
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_attr_name: malloc failed");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_attr_name: malloc failed");
if ((check_size = H5Rget_attr_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
@@ -645,9 +645,9 @@ Java_hdf_hdf5lib_H5_H5Rcreate
}
if ((H5R_OBJECT == ref_type) && (refBufLen != H5R_OBJ_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcreate: reference input array length != H5R_OBJ_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcreate: reference input array length != H5R_OBJ_REF_BUF_SIZE");
else if ((H5R_DATASET_REGION == ref_type) && (refBufLen != H5R_DSET_REG_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcreate: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcreate: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE");
else if ((H5R_OBJECT != ref_type) && (H5R_DATASET_REGION != ref_type))
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rcreate: unknown reference type");
@@ -692,9 +692,9 @@ Java_hdf_hdf5lib_H5__1H5Rdereference
}
if ((H5R_OBJECT == ref_type) && (refBufLen != H5R_OBJ_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdereference: reference input array length != H5R_OBJ_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdereference: reference input array length != H5R_OBJ_REF_BUF_SIZE");
else if ((H5R_DATASET_REGION == ref_type) && (refBufLen != H5R_DSET_REG_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdereference: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdereference: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE");
else if ((H5R_OBJECT != ref_type) && (H5R_DATASET_REGION != ref_type))
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rdereference: unknown reference type");
@@ -854,16 +854,16 @@ Java_hdf_hdf5lib_H5_H5Rget_1name
}
if ((H5R_OBJECT == ref_type) && (refBufLen != H5R_OBJ_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: reference input array length != H5R_OBJ_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: reference input array length != H5R_OBJ_REF_BUF_SIZE");
else if ((H5R_DATASET_REGION == ref_type) && (refBufLen != H5R_DSET_REG_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE")
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE");
else if ((H5R_OBJECT != ref_type) && (H5R_DATASET_REGION != ref_type))
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: unknown reference type");
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_name: reference buffer not pinned");
if (NULL == (aName = (char *) HDmalloc(sizeof(char) * (size_t)size + 1)))
- H5_JNI_FATAL_ERROR(ENVONLY, "H5Rget_name: failed to allocate referenced object name buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_name: failed to allocate referenced object name buffer");
if ((ret_val = (jlong)H5Rget_name((hid_t)loc_id, (H5R_type_t)ref_type, refBuf, aName, (size_t)size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);