[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
This commit is contained in:
Quincey Koziol 2009-11-10 14:29:56 -05:00
parent a83a4ece41
commit a44328438a

View File

@ -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