summaryrefslogtreecommitdiffstats
path: root/tools/src/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/misc')
-rw-r--r--tools/src/misc/h5clear.c9
-rw-r--r--tools/src/misc/h5mkgrp.c14
2 files changed, 10 insertions, 13 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index b81e2b3..3bd570a 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -266,14 +266,9 @@ main (int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
- /* Disable the HDF5 library's error reporting */
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
-
/* initialize h5tools lib */
h5tools_init();
- H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL);
-
/* Parse command line options */
if(parse_command_line(argc, argv) < 0)
goto done;
@@ -281,6 +276,9 @@ main (int argc, const char *argv[])
if(fname_g == NULL)
goto done;
+ /* enable error reporting if command line option */
+ h5tools_error_report();
+
/* Print usage/exit if not using at least one of the options */
if(!clear_status_flags && !remove_cache_image &&
!increment_eoa_eof && !print_filesize) {
@@ -387,7 +385,6 @@ main (int argc, const char *argv[])
warn_msg("No cache image in the file\n");
}
-
h5tools_setstatus(EXIT_SUCCESS);
done:
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index cbd6e6d..4d2d2b8 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -49,7 +49,7 @@ typedef struct mkgrp_opt_t {
mkgrp_opt_t params_g; /* Command line parameter settings */
-
+
/*-------------------------------------------------------------------------
* Function: leave
*
@@ -81,7 +81,7 @@ leave(int ret)
HDexit(ret);
} /* end leave() */
-
+
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -113,7 +113,7 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, "\n");
} /* end usage() */
-
+
/*-------------------------------------------------------------------------
* Function: parse_command_line
*
@@ -248,7 +248,7 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options)
return 0;
} /* parse_command_line() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -268,9 +268,6 @@ main(int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
- /* Disable the HDF5 library's error reporting */
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
-
/* Initialize h5tools lib */
h5tools_init();
@@ -289,6 +286,9 @@ main(int argc, const char *argv[])
leave(EXIT_FAILURE);
}
+ /* enable error reporting if command line option */
+ h5tools_error_report();
+
/* Check for creating groups with new format version */
if(params_g.latest) {
/* Set the "use the latest version of the format" bounds */