summaryrefslogtreecommitdiffstats
path: root/java/src/jni/exceptionImp.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-03-13 22:36:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-03-13 22:36:08 (GMT)
commit880d14d4c545c795d525285985287829d43c3f42 (patch)
treeba7bf64fc2c3ce95e0c875941dfbfb66207cf6b6 /java/src/jni/exceptionImp.c
parent6a90c221e29d83e54d20377a48928f980fcf19c8 (diff)
downloadhdf5-880d14d4c545c795d525285985287829d43c3f42.zip
hdf5-880d14d4c545c795d525285985287829d43c3f42.tar.gz
hdf5-880d14d4c545c795d525285985287829d43c3f42.tar.bz2
HDFFV-10412 add complemnt to java error_off
Diffstat (limited to 'java/src/jni/exceptionImp.c')
-rw-r--r--java/src/jni/exceptionImp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c
index 05c193f..afad5d5 100644
--- a/java/src/jni/exceptionImp.c
+++ b/java/src/jni/exceptionImp.c
@@ -33,6 +33,9 @@ extern "C" {
#include "h5jni.h"
#include "exceptionImp.h"
+extern H5E_auto2_t efunc;
+extern void *edata;
+
/*******************/
/* Local Variables */
@@ -122,10 +125,24 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5error_1off
(JNIEnv *env, jclass clss)
{
+ H5Eget_auto2(H5E_DEFAULT, &efunc, &edata);
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
return 0;
} /* end Java_hdf_hdf5lib_H5_H5error_1off() */
+/*
+ * Class: hdf_hdf5lib_exceptions_HDF5Library
+ * Method: H5error_on
+ * Signature: ()V
+ *
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5error_1on
+ (JNIEnv *env, jclass clss)
+{
+ H5Eset_auto2(H5E_DEFAULT, efunc, edata);
+} /* end Java_hdf_hdf5lib_H5_H5error_1on() */
+
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException