[Top] [Prev] [Next] [Bottom]

tpstrerrordetail(3)

tpstrerrordetail(3)

Name

tpstrerrordetail-get error detail message string for a BEA TUXEDO system error

Synopsis

#include <atmi.h> 
char * tpstrerrordetail(int err, long flags)

Description

tpstrerrordetail() is used to retrieve the text of an error detail of a BEA TUXEDO system error. err is the value returned by tperrordetail(3).

The user can use the pointer returned by tpstrerrordetail as an argument to userlog(3c) or the UNIX function fprintf(3).

Currently flags is reserved for future use and must be set to 0.

Return Values

If err is an invalid error code, tpstrerrordetail returns a NULL. On success, the function returns a pointer to a string that contains the error detail message text.

Errors

tpstrerrordetail returns a NULL on error, but does not set tperrno.

Example

#include <atmi.h> .  .  .  
int ret;
char *p;
if (tpbegin(10,0) == -1) {
ret=tperrordetail(0);
if (ret == -1) {
(void) fprintf(stderr, "tperrordetail( ) failed!\n");
(void) fprintf(stderr, "tperrno = %d, %s\n",
tperrno, tpstrerror(tperrno));
}
else if (ret != 0) {
(void) fprintf(stderr, "errordetail:%s\n",
tpstrerrordetail(ret, 0);
}}
}

See Also

intro(3c), tperrordetail(3c), tpstrerror(3c), userlog(3c), tperrno(5)



[Top] [Prev] [Next] [Bottom]