diff options
author | David Young <dyoung@hdfgroup.org> | 2020-08-04 15:22:47 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-08-04 15:22:47 (GMT) |
commit | dc97b9a16569e588dd6c112153b3136003b14ee1 (patch) | |
tree | 2ea651b76195b4c7ef803ae3a518e4f7a6b3daf7 /tools/src/h5copy/h5copy.c | |
parent | f28c92bb3661f43e9e05a15b78f748eb106adc18 (diff) | |
parent | 33c0016eb63a1d7894bd708cd020ba091a9a9857 (diff) | |
download | hdf5-dc97b9a16569e588dd6c112153b3136003b14ee1.zip hdf5-dc97b9a16569e588dd6c112153b3136003b14ee1.tar.gz hdf5-dc97b9a16569e588dd6c112153b3136003b14ee1.tar.bz2 |
Merge branch 'aug-develop' into aug-merge-attempt/feature/vfd_swmr
Diffstat (limited to 'tools/src/h5copy/h5copy.c')
-rw-r--r-- | tools/src/h5copy/h5copy.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 8805d08..5b19ae7 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -207,10 +207,6 @@ static int parse_flag(const char* s_flag, unsigned *flag) int main (int argc, const char *argv[]) { - H5E_auto2_t func; - H5E_auto2_t tools_func; - void *edata; - void *tools_edata; hid_t fid_src = H5I_INVALID_HID; hid_t fid_dst = H5I_INVALID_HID; unsigned flag = 0; @@ -226,17 +222,9 @@ main (int argc, const char *argv[]) h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); - /* Disable error reporting */ - H5Eget_auto2(H5E_DEFAULT, &func, &edata); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - /* Initialize h5tools lib */ h5tools_init(); - /* Disable tools error reporting */ - H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); - H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); - /* init linkinfo struct */ HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t)); @@ -330,10 +318,8 @@ main (int argc, const char *argv[]) leave(EXIT_FAILURE); } - if (enable_error_stack > 0) { - H5Eset_auto2(H5E_DEFAULT, func, edata); - H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); - } + /* enable error reporting if command line option */ + h5tools_error_report(); /*------------------------------------------------------------------------- * open output file |