summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-13 21:58:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-13 21:58:58 (GMT)
commit650f9e616dbb60aa8ef1706a6968aacd1c23a568 (patch)
tree3706988dbb96e076b82246036e6d7117e4221702 /java
parent054059a30c081a88e0a2dfe05d036d617f434e55 (diff)
parentbb5e7822f447b8a175e807e2e7bad5e0192394e5 (diff)
downloadhdf5-650f9e616dbb60aa8ef1706a6968aacd1c23a568.zip
hdf5-650f9e616dbb60aa8ef1706a6968aacd1c23a568.tar.gz
hdf5-650f9e616dbb60aa8ef1706a6968aacd1c23a568.tar.bz2
Merge pull request #1727 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:H5Fdelete_vol_only to develop
* commit 'bb5e7822f447b8a175e807e2e7bad5e0192394e5': Fixed an error string typo Added H5Fdelete call and VOL support (but no VFD/native implementation).
Diffstat (limited to 'java')
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java3
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java5
-rw-r--r--java/src/jni/h5Constants.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index 8054ee8..cb5ed22 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -121,6 +121,7 @@ public class HDF5Constants {
public static final long H5E_CANTDEC = H5E_CANTDEC();
public static final long H5E_CANTDECODE = H5E_CANTDECODE();
public static final long H5E_CANTDELETE = H5E_CANTDELETE();
+ public static final long H5E_CANTDELETEFILE = H5E_CANTDELETEFILE();
public static final long H5E_CANTENCODE = H5E_CANTENCODE();
public static final long H5E_CANTFLUSH = H5E_CANTFLUSH();
public static final long H5E_CANTFREE = H5E_CANTFREE();
@@ -863,6 +864,8 @@ public class HDF5Constants {
private static native final long H5E_CANTDELETE();
+ private static native final long H5E_CANTDELETEFILE();
+
private static native final long H5E_CANTENCODE();
private static native final long H5E_CANTFLUSH();
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
index 3a1361a..54acbdd 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
@@ -171,6 +171,9 @@ public class HDF5LibraryException extends HDF5Exception {
else if (err_code == HDF5Constants.H5E_MOUNT) {
return "file mount error";
}
+ else if (err_code == HDF5Constants.H5E_CANTDELETEFILE) {
+ return "Unable to delete file";
+ }
else if (err_code == HDF5Constants.H5E_SEEKERROR) {
return "seek failed";
}
@@ -262,7 +265,7 @@ public class HDF5LibraryException extends HDF5Exception {
return "unrecognized message";
}
else if (err_code == HDF5Constants.H5E_CANTDELETE) {
- return " Can't delete message";
+ return "Can't delete message";
}
else if (err_code == HDF5Constants.H5E_CANTOPENOBJ) {
return "Can't open object";
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index 4b10479..b9e320f 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -204,6 +204,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDECODE(JNIEnv *env, jclass cls) { return
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETE(JNIEnv *env, jclass cls) { return H5E_CANTDELETE; }
JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETEFILE(JNIEnv *env, jclass cls) { return H5E_CANTDELETEFILE; }
+JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTENCODE(JNIEnv *env, jclass cls) { return H5E_CANTENCODE; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFLUSH(JNIEnv *env, jclass cls) { return H5E_CANTFLUSH; }