PURPOSE

tpstrerrordetail - get error detail message string for TUXEDO error

SYNOPSIS

 
#include 

char * tpstrerrordetail(int err, long flags)

DESCRIPTION

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

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

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 
 .
 .
 .
	int e;
	char *p;
	if (tpbegin(10,0) == -1) {
		e=tperrordetail(0);
		if (e != 0) {
			p = tpstrerrordetail( e, 0 );
			userlog("%s", p);
		}
		.
		.
		.
		}
 .
 .
 .

SEE ALSO

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