diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
commit | faca6fbaa8c557b18d6b264841fc8717d1e73816 (patch) | |
tree | 2123e6290a24e6ad94c776e45283800cc6917f92 /src/H5Eprivate.h | |
parent | 3c16901751f40fcbbf36878fe13b0237a3753bc9 (diff) | |
download | hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.zip hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.gz hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.bz2 |
[svn-r145] ./src/H5Osdtyp.c -> H5Odtype.c
./src/H5Osdim.c -> H5Osdspace.c
./src/Makefile.in
Changed the names of these files to better reflect what they
actually do.
./src/H5.c
./src/H5AC.c
./src/H5B.c
./src/H5C.c
./src/H5D.c
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
./src/H5F.c
./src/H5Fcore.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fsec2.c
./src/H5Fsplit.c
./src/H5Fstdio.c
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gshad.c
./src/H5Gstab.c
./src/H5H.c
./src/H5M.c
./src/H5MF.c
./src/H5O.c
./src/H5Osdtyp.c (./src/H5Odtype.c)
./src/H5P.c
./src/H5T.c
./src/H5detect.c
./src/H5private.h
Added an argument to the HRETURN_ERROR(), HGOTO_ERROR(), and
HERROR() macros which is a string error message. This allows
us to give extra information which can't be represented by the
major and minor error numbers. This information was
previously in comments just before or after the macro call.
The string isn't currently used, but I'm planning to change
the test files so they print an error trace when something
fails. This should make debugging a little faster since it's
often obvious what's wrong if we could just see the error
stack without even having to start a debugger.
Diffstat (limited to 'src/H5Eprivate.h')
-rw-r--r-- | src/H5Eprivate.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 50b8241..47d3631 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -36,14 +36,14 @@ Assume that func and file are both stored in static space, or at least be not corrupted in the meanwhile. */ -#define HERROR(maj, min) H5Epush(maj, min, FUNC, __FILE__, __LINE__) +#define HERROR(maj, min, str) H5Epush(maj, min, FUNC, __FILE__, __LINE__) /* HRETURN_ERROR macro, used to facilitate error reporting. Makes same assumptions as HERROR. IN ADDITION, this macro causes a return from the calling routine */ -#define HRETURN_ERROR(maj, min, ret_val) { \ - HERROR (maj, min); \ +#define HRETURN_ERROR(maj, min, ret_val, str) { \ + HERROR (maj, min, str); \ PABLO_TRACE_OFF (PABLO_MASK, pablo_func_id); \ return (ret_val); \ } @@ -60,8 +60,8 @@ a jump to the label 'done' which should be in every fucntion Also there is an assumption of a variable 'ret_value' */ -#define HGOTO_ERROR(maj, min, ret_val) { \ - HERROR (maj, min); \ +#define HGOTO_ERROR(maj, min, ret_val, str) { \ + HERROR (maj, min, str); \ ret_value = ret_val; \ goto done; \ } @@ -87,7 +87,7 @@ */ typedef struct { - hdf_maj_err_code_t error_code; + H5E_major_t error_code; const char *str; } hdf_maj_error_messages_t; @@ -95,7 +95,7 @@ hdf_maj_error_messages_t; typedef struct { - hdf_min_err_code_t error_code; + H5E_minor_t error_code; const char *str; } hdf_min_error_messages_t; @@ -107,8 +107,8 @@ hdf_min_error_messages_t; /* the structure of the error stack element */ typedef struct error_t { - hdf_maj_err_code_t maj; /* Major error number */ - hdf_min_err_code_t min; /* Minor error number */ + H5E_major_t maj; /* Major error number */ + H5E_minor_t min; /* Minor error number */ char function_name[MAX_FUNC_NAME_LEN]; /* function where error occur */ const char *file_name; /* file where error occur */ intn line; /* line in file where error occurs */ @@ -132,6 +132,6 @@ extern int32 thrderrid; /* Thread-specific "global" error-handler ID */ extern hbool_t install_atexit; /* Whether to install the atexit routine */ /* Private functions in H5E.c */ -herr_t H5E_store(int32 errid, hdf_maj_err_code_t maj, hdf_min_err_code_t min, const char *function_name, const char *file_name, intn line); +herr_t H5E_store(int32 errid, H5E_major_t maj, H5E_minor_t min, const char *function_name, const char *file_name, intn line); #endif |