Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


tpstrerrordetail(3c)

Name

tpstrerrordetail()—Gets error detail message string for a BEA Tuxedo ATMI 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 ATMI system error. err is the value returned by tperrordetail().

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

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

A thread in a multithreaded application may issue a call to tpstrerrordetail() while running in any context state, including TPINVALIDCONTEXT.

Return Values

Upon success, the function returns a pointer to a string that contains the error detail message text.

Upon failure (that is, if err is an invalid error code), tpstrerrordetail() returns a NULL.

Errors

Upon failure, tpstrerrordetail() returns a NULL 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

Introduction to the C Language Application-to-Transaction Monitor Interface, tperrordetail(3c), tpstrerror(3c), userlog(3c), tperrno(5)

 

Skip navigation bar  Back to Top Previous Next