diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-08-05 16:12:39 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-08-06 13:14:04 (GMT) |
commit | 762c14fde587f2ff4f9b9cdaa6b2232a481edde4 (patch) | |
tree | d375060fdb22395e121c3f4d3b07e940ff634640 /java/src/jni/h5lImp.c | |
parent | 51d31c5ff89f4cf9f1d29d994e5ab6594c3dbd1d (diff) | |
download | hdf5-762c14fde587f2ff4f9b9cdaa6b2232a481edde4.zip hdf5-762c14fde587f2ff4f9b9cdaa6b2232a481edde4.tar.gz hdf5-762c14fde587f2ff4f9b9cdaa6b2232a481edde4.tar.bz2 |
Improve error handling of exceptions
Diffstat (limited to 'java/src/jni/h5lImp.c')
-rw-r--r-- | java/src/jni/h5lImp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index ac71845..7391490 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -574,8 +574,12 @@ H5L_iterate_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "<init>", "(IZJIJ)V"); if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + if (cb_info_t == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + } } /* end if */ } /* end if */ } /* end if */ |