BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo C Function Reference

tpstrerrordetail(3c)

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().

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-Transaction Monitor Interface, tperrordetail(3c), tpstrerror(3c), userlog(3c), tperrno(5)