summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-10 19:29:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-10 19:29:56 (GMT)
commita44328438aa5bbe4c4927b584af18d7965e6794a (patch)
treecc2472b0bdbbc83c36955088b8496e98e425a153
parenta83a4ece41ba2777ad8c6b5f82e476d9abc86974 (diff)
downloadhdf5-a44328438aa5bbe4c4927b584af18d7965e6794a.zip
hdf5-a44328438aa5bbe4c4927b584af18d7965e6794a.tar.gz
hdf5-a44328438aa5bbe4c4927b584af18d7965e6794a.tar.bz2
[svn-r17863] Description:
Switch HSYS_GOTO_ERROR() & HSYS_DONE_ERROR() macros to use printf-like functionality for displaying system error messages. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
-rw-r--r--src/H5Eprivate.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index f951928..4c226d0 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -84,16 +84,13 @@ typedef struct H5E_t H5E_t;
/* Retrieve the error code description string and push it onto the error
* stack.
*/
-#define HSYS_ERROR(errnum) { \
- HERROR(H5E_INTERNAL, H5E_SYSERRSTR, HDstrerror(errnum)); \
-}
#define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str) { \
- HSYS_ERROR(errno); \
- HDONE_ERROR(majorcode, minorcode, retcode, str); \
+ int myerrno = errno; \
+ HDONE_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, HDstrerror(myerrno)); \
}
#define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) { \
- HSYS_ERROR(errno); \
- HGOTO_ERROR(majorcode, minorcode, retcode, str); \
+ int myerrno = errno; \
+ HGOTO_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, HDstrerror(myerrno)); \
}
#ifdef H5_HAVE_PARALLEL