summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_error.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-02 14:53:45 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-02 14:53:54 (GMT)
commit38e2f0e7847556ba06ee72e9451a1bab022c472e (patch)
treeed175ade604a36b87243b905d09183bef88f5fbf /tools/lib/h5tools_error.h
parentb7e563266e8484c96d5ac75b9dcec2337bb15d43 (diff)
downloadhdf5-38e2f0e7847556ba06ee72e9451a1bab022c472e.zip
hdf5-38e2f0e7847556ba06ee72e9451a1bab022c472e.tar.gz
hdf5-38e2f0e7847556ba06ee72e9451a1bab022c472e.tar.bz2
Update error handling to support ARGS and tools stack
Diffstat (limited to 'tools/lib/h5tools_error.h')
-rw-r--r--tools/lib/h5tools_error.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index a556b0a..2cdaf74 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -65,16 +65,16 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* H5TOOLS_INFO macro, used to facilitate error reporting . The arguments are the major
* error number, the minor error number, and a description of the error.
*/
-#define H5TOOLS_INFO(min_id, str) { \
- H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \
+#define H5TOOLS_INFO(min_id, ...) { \
+ H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
}
/*
* 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(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, str); \
+#define HERROR(maj_id, min_id, ...) { \
+ H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, maj_id, min_id, __VA_ARGS__); \
ret_value = FAIL; \
}
@@ -103,8 +103,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* The return value is assigned to a variable `ret_value' and control branches
* to the `catch_except' label, if we're not already past it.
*/
-#define H5E_THROW(fail_value, min_id, str) { \
- H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \
+#define H5E_THROW(fail_value, min_id, ...) { \
+ H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, __VA_ARGS__); \
H5_LEAVE(fail_value) \
}
@@ -114,8 +114,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g;
* error string. The return value is assigned to a variable `ret_value' and
* control branches to the `done' label.
*/
-#define HGOTO_ERROR(fail_value, min_id, str) { \
- HERROR(H5E_tools_g, min_id, str); \
+#define HGOTO_ERROR(fail_value, min_id, ...) { \
+ HERROR(H5E_tools_g, min_id, __VA_ARGS__); \
HGOTO_DONE(fail_value) \
}