summaryrefslogtreecommitdiffstats
path: root/src/H5Eprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-04-12 01:59:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-04-12 01:59:45 (GMT)
commitd6bb18abbc2d6e145afff18446a0814403f1a3b7 (patch)
tree8a340ebde9f0fea052c3d40b6e98f2d0ca7f7aaa /src/H5Eprivate.h
parentde71a7fe74ca0954efec963066e2606d798691f4 (diff)
downloadhdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.zip
hdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.tar.gz
hdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.tar.bz2
[svn-r13648] Description:
Rename new error handling API routines from H5E<foo>_stack() to H5E<foo>2(). Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty)
Diffstat (limited to 'src/H5Eprivate.h')
-rw-r--r--src/H5Eprivate.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index 09b7e2b..9d444bc 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -25,7 +25,6 @@
#include "H5private.h"
#define H5E_NSLOTS 32 /*number of slots in an error stack */
-#define H5E_RESERVED_ATOMS 0
/* Error class */
typedef struct H5E_cls_t {
@@ -44,11 +43,11 @@ typedef struct H5E_msg_t {
/* Error stack */
typedef struct H5E_t {
size_t nused; /* Num slots currently used in stack */
- H5E_error_stack_t slot[H5E_NSLOTS]; /* Array of error records */
+ H5E_error2_t slot[H5E_NSLOTS]; /* Array of error records */
hbool_t new_api; /* Indicate that the function pointer is for the new (stack) API or the old */
union {
- H5E_auto_t func; /* Function for 'automatic' error reporting */
- H5E_auto_stack_t func_stack; /* Function for 'automatic' error reporting */
+ H5E_auto_t func; /* Function for 'automatic' error reporting */
+ H5E_auto2_t func2; /* Function for 'automatic' error reporting with error stacks */
} u;
void *auto_data; /* Callback data for 'automatic error reporting */
} H5E_t;
@@ -59,10 +58,6 @@ typedef struct H5E_print_t {
H5E_cls_t cls;
} H5E_print_t;
-/* HDF5 error class */
-#define H5E_CLS_NAME "HDF5"
-#define H5E_CLS_LIB_NAME "HDF5"
-
/*
* HERROR macro, used to facilitate error reporting between a FUNC_ENTER()
* and a FUNC_LEAVE() within a function body. The arguments are the major
@@ -88,7 +83,7 @@ typedef struct H5E_print_t {
* without jumping to any labels)
*/
#define HDONE_ERROR(maj, min, ret_val, str) { \
- HCOMMON_ERROR (maj, min, str); \
+ HCOMMON_ERROR(maj, min, str); \
ret_value = ret_val; \
}
@@ -100,8 +95,8 @@ typedef struct H5E_print_t {
* control branches to the `done' label.
*/
#define HGOTO_ERROR(maj, min, ret_val, str) { \
- HCOMMON_ERROR (maj, min, str); \
- HGOTO_DONE (ret_val) \
+ HCOMMON_ERROR(maj, min, str); \
+ HGOTO_DONE(ret_val) \
}
/*
@@ -113,11 +108,11 @@ typedef struct H5E_print_t {
#define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;}
/* Library-private functions defined in H5E package */
-H5_DLL herr_t H5E_init(void);
-H5_DLL herr_t H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
+H5_DLL herr_t H5E_init(void);
+H5_DLL herr_t H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
hid_t cls_id, hid_t maj_id, hid_t min_id, const char *desc);
-H5_DLL herr_t H5E_clear_stack(H5E_t *estack);
-H5_DLL herr_t H5E_dump_api_stack(int is_api);
+H5_DLL herr_t H5E_clear_stack(H5E_t *estack);
+H5_DLL herr_t H5E_dump_api_stack(int is_api);
/*
* Macros handling system error messages as described in C standard.
@@ -127,14 +122,14 @@ H5_DLL herr_t H5E_dump_api_stack(int is_api);
/* Retrieve the error code description string and push it onto the error
* stack.
*/
-#define HSYS_ERROR(errnum){ \
+#define HSYS_ERROR(errnum) { \
HERROR(H5E_INTERNAL, H5E_SYSERRSTR, HDstrerror(errnum)); \
}
-#define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str){ \
+#define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str) { \
HSYS_ERROR(errno); \
HDONE_ERROR(majorcode, minorcode, retcode, str); \
}
-#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str){ \
+#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) { \
HSYS_ERROR(errno); \
HGOTO_ERROR(majorcode, minorcode, retcode, str); \
}
@@ -159,6 +154,7 @@ extern int H5E_mpi_error_str_len;
HMPI_ERROR(mpierr); \
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
}
-#endif
+#endif /* H5_HAVE_PARALLEL */
+
+#endif /* _H5Eprivate_H */
-#endif