summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_error.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-03-12 16:33:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-03-12 16:33:15 (GMT)
commitbec199165a54b8c369c40a11b9159771fb947b1c (patch)
tree266d26159e2a4251383a9803a93145b90a727115 /tools/lib/h5tools_error.h
parent80b2b54f416f102404ba9f7f724ec3e8241a4b71 (diff)
downloadhdf5-bec199165a54b8c369c40a11b9159771fb947b1c.zip
hdf5-bec199165a54b8c369c40a11b9159771fb947b1c.tar.gz
hdf5-bec199165a54b8c369c40a11b9159771fb947b1c.tar.bz2
[svn-r22042] HDFFV-7957-7958:
Add tools error stack and check return from H5Dreference call. Tested: CMake and h5committest
Diffstat (limited to 'tools/lib/h5tools_error.h')
-rw-r--r--tools/lib/h5tools_error.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index 207218e..ae549fd 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -22,6 +22,7 @@
#include "H5Epublic.h"
/* tools-HDF5 Error variables */
+H5TOOLS_DLLVAR hid_t H5tools_ERR_STACK_g;
H5TOOLS_DLLVAR hid_t H5tools_ERR_CLS_g;
H5TOOLS_DLLVAR hid_t H5E_tools_g;
H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
@@ -66,7 +67,11 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* HERROR macro, used to facilitate error reporting . The arguments are the major
* error number, the minor error number, and a description of the error.
*/
-#define HERROR(maj_id, min_id, str) H5Epush2(H5E_DEFAULT, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, str)
+#define HERROR(maj_id, min_id, str) { \
+ H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, str); \
+ ret_value = FAIL; \
+}
+
/* Macro for "catching" flow of control when an error occurs. Note that the
* H5_LEAVE macro won't jump back here once it's past this point.