Skip to content

Commit

Permalink
[svn-r17863] Description:
Browse files Browse the repository at this point in the history
	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
  • Loading branch information
qkoziol committed Nov 10, 2009
1 parent a83a4ec commit a443284
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/H5Eprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a443284

Please sign in to comment.