diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-10 19:37:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-10 19:37:42 (GMT) |
commit | 8e1e3d8708a4c4f33cb2de4e81e54ad2a05df0a7 (patch) | |
tree | 86a03ab67bbcf01ad29e38d11fe53397da0a3d2c | |
parent | 37358db8ab62fa9c9057ea118b8576d5a4368ef1 (diff) | |
download | hdf5-8e1e3d8708a4c4f33cb2de4e81e54ad2a05df0a7.zip hdf5-8e1e3d8708a4c4f33cb2de4e81e54ad2a05df0a7.tar.gz hdf5-8e1e3d8708a4c4f33cb2de4e81e54ad2a05df0a7.tar.bz2 |
[svn-r17864] Description:
Bring r17863 from trunk to 1.8 branch:
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.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 42f2e9c..4d5b8ad 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -93,16 +93,13 @@ 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) { \ - 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 |