diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-02-28 18:19:05 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-02-28 18:19:05 (GMT) |
commit | 808a5e6be1b7f1025c6b1182e160cefbce0f8e68 (patch) | |
tree | 59eabaf3e7991d5791b83dbaa0d5797fc5e44ae9 /src/H5Epublic.h | |
parent | 0b4d32bb4a12fe0e34026c0f069aa99bf34cd834 (diff) | |
download | hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.zip hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.tar.gz hdf5-808a5e6be1b7f1025c6b1182e160cefbce0f8e68.tar.bz2 |
[svn-r302] Changes since 19980227
----------------------
./html/Errors.html [NEW]
./html/H5.user.html
./MANIFEST
Documents the new error handling interface and gives examples.
./src/H5.c
./src/H5private.h
./src/H5Apublic.h
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
Rewrote error handling. Got rid of `push' overloading and
added a few API functions. The error stack is statically
allocated and not entered into H5A, simplifying error handling
within the error handler. Rudimentary support for threads.
Changed the names of some errors.
./src/H5G.c
./src/H5Gnode.c
./src/H5H.c
./src/H5O.c
./src/H5T.c
Changed H5ECLEAR to H5E_clear().
./src/Makefile.in
Alphabetized source list.
./test/dsets.c
Turned off error reporting around functions that are expected
to fail. Error messages are sent to stdout.
./test/testhdf5.c
./test/testhdf5.h
Turned off automatic error reporting since this file mostly
calls internal functions and does its own error reporting.
Diffstat (limited to 'src/H5Epublic.h')
-rw-r--r-- | src/H5Epublic.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/H5Epublic.h b/src/H5Epublic.h index c71bd3a..2ceb9a3 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -79,7 +79,7 @@ typedef enum H5E_minor_t { H5E_OVERFLOW, /*address overflowed */ /* Function entry/exit interface errors */ - H5E_CANTINIT, /*Can't initialize interface */ + H5E_CANTINIT, /*Can't initialize */ H5E_ALREADYINIT, /*object already initialized */ /* Object atom related errors */ @@ -114,17 +114,37 @@ typedef enum H5E_minor_t { H5E_LINK /*link count failure */ } H5E_minor_t; +/* Information about an error */ +typedef struct H5E_error_t { + H5E_major_t maj_num; /*major error number */ + H5E_minor_t min_num; /*minor error number */ + const char *func_name; /*function in which error occurred */ + const char *file_name; /*file in which error occurred */ + unsigned line; /*line in file where error occurs */ + const char *desc; /*optional supplied description */ +} H5E_error_t; + +/* Error stack traversal direction */ +typedef enum H5E_direction_t { + H5E_WALK_UPWARD = 0, /*begin deep, end at API function */ + H5E_WALK_DOWNWARD = 1 /*begin at API function, end deep */ +} H5E_direction_t; + +/* Error stack traversal callback function */ +typedef herr_t (*H5E_walk_t)(int n, H5E_error_t *err_desc, void *client_data); + #ifdef __cplusplus extern "C" { #endif -hid_t H5Ecreate (uintn initial_stack_nelmts); -herr_t H5Eclose (hid_t estack_id); -herr_t H5Epush (hid_t estack_id, H5E_major_t maj_num, H5E_minor_t min_num, - const char *function_name, const char *file_name, intn line, - const char *desc); -herr_t H5Eclear (hid_t estack_id); -herr_t H5Eprint (hid_t estack_id, FILE * file); +herr_t H5Eset_auto (herr_t (*func)(void*client_data), void *client_data); +herr_t H5Eget_auto (herr_t (**func)(void*client_data), void **client_data); +herr_t H5Eclear (void); +herr_t H5Eprint (FILE *stream); +herr_t H5Ewalk (H5E_direction_t direction, H5E_walk_t func, void *client_data); +herr_t H5Ewalk_cb (int n, H5E_error_t *err_desc, void *client_data); +const char *H5Eget_major (H5E_major_t major_number); +const char *H5Eget_minor (H5E_minor_t minor_number); #ifdef __cplusplus } |