BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   C Function Reference   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


tpstrerror(3c)

Name

tpstrerror()—Gets error message string for a BEA Tuxedo ATMI system error.

Synopsis

#include <atmi.h> 
char *
tpstrerror(int err)

Description

tpstrerror() is used to retrieve the text of an error message from LIBTUX_CAT. err is the error code set in tperrno() when a BEA Tuxedo ATMI system function call returns a -1 or other failure value.

You can use the pointer returned by tpstrerror() as an argument to userlog() or the UNIX function fprintf().

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

Return Values

Upon success, tpstrerror() returns a pointer to a string that contains the error message text.

If err is an invalid error code, tpstrerror() returns a NULL.

Errors

Upon failure, tpstrerror() returns a NULL but does not set tperrno().

Example

#include <atmi.h>
.
.
.
char *p;
if (tpbegin(10,0) == -1) {
p = tpstrerror(tperrno);
userlog("%s", p);
(void)tpabort(0);
(void)tpterm();
exit(1);
}

See Also

userlog(3c), Fstrerror, Fstrerror32(3fml)

 

back to top previous page next page