diff options
author | David Young <dyoung@hdfgroup.org> | 2020-07-30 23:15:09 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-07-30 23:15:09 (GMT) |
commit | 0bb87534a6a78d5a5bddd84b9aa4867826368d8b (patch) | |
tree | 830d41498d87478ea8cc22e2f6e36011008e8c6e /tools/src/h5stat | |
parent | 3e91eeb270efaa2075c80e81895066bccf1b1a47 (diff) | |
parent | 88aa0d5c76545eabf08be069a684fd7328eb4185 (diff) | |
download | hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.zip hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.gz hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.bz2 |
Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment
Diffstat (limited to 'tools/src/h5stat')
-rw-r--r-- | tools/src/h5stat/h5stat.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 82fc731..93b7242 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1786,32 +1786,23 @@ main(int argc, const char *argv[]) iter_t iter; const char *fname = NULL; hid_t fid = H5I_INVALID_HID; - H5E_auto2_t func; - H5E_auto2_t tools_func; - void *edata; - void *tools_edata; struct handler_t *hand = NULL; hid_t fapl_id = H5P_DEFAULT; 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); - HDmemset(&iter, 0, sizeof(iter)); if(parse_command_line(argc, argv, &hand) < 0) goto done; + /* enable error reporting if command line option */ + h5tools_error_report(); + if (drivername) { h5tools_vfd_info_t vfd_info; @@ -1843,11 +1834,6 @@ main(int argc, const char *argv[]) fname = argv[opt_ind]; - if(enable_error_stack > 0) { - H5Eset_auto2(H5E_DEFAULT, func, edata); - H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); - } - /* Check for filename given */ if(fname) { hid_t fcpl; @@ -1952,8 +1938,6 @@ done: h5tools_setstatus(EXIT_FAILURE); } /* end if */ - H5Eset_auto2(H5E_DEFAULT, func, edata); - leave(h5tools_getstatus()); } /* end main() */ |