*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> t_error (3n)              
Title
Content
Arch
Section
 

Contents


t_error(3N)							   t_error(3N)


NAME    [Toc]    [Back]

     t_error - produce error message

SYNOPSIS    [Toc]    [Back]

     #ifdef _XOPEN_SOURCE
     #include <xti.h>

     int t_error(errmsg)
     #else
     #include <tiuser.h>

     void t_error(errmsg)
     #endif

     char *errmsg;
     extern int	t_errno;
     extern char *t_errlist[];
     extern int	t_nerr;

DESCRIPTION    [Toc]    [Back]

     t_error produces a	message	on the standard	error output which describes
     the last error encountered	during a call to a transport function.	The
     argument string errmsg is a user-supplied error message that gives
     context to	the error.

     t_error prints the	user-supplied error message followed by	a colon	and
     the standard transport function error message for the current value
     contained in t_errno.  If t_errno is TSYSERR, t_error will	also print the
     standard error message for	the current value contained in errno [see
     intro(2)].

     t_errlist is the array of message strings,	to allow user message
     formatting.  t_errno can be used as an index into this array to retrieve
     the error message string (without a terminating newline).	t_nerr is the
     maximum index value for the t_errlist array.

     t_errno is	set when an error occurs and is	not cleared on subsequent
     successful	calls.

     This function resides within both the X/Open compliant libxnet and	the
     SVR4 compliant libnsl Network Services libraries.	Network	Services
     applications which	require	X/Open compliance must link-load with -lxnet.
     Network Services applications which require SVR4 compliance must linkload
 with -lnsl.

EXAMPLE    [Toc]    [Back]

     If	a t_connect function fails on transport	endpoint fd2 because a bad
     address was given,	the following call might follow	the failure:

	  t_error("t_connect failed on fd2");





									Page 1






t_error(3N)							   t_error(3N)



     The diagnostic message would print	as:

	  t_connect failed on fd2:  Incorrect transport	address	format

     where ``t_connect failed on fd2'' tells the user which function failed on
     which transport endpoint, and ``Incorrect transport address format''
     identifies	the specific error that	occurred.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
t_error Tru64 Produce an error message
t_strerror Tru64 Produce an error message string
t_strerror IRIX produce an error message string
t_strerror HP-UX produce an error message string
gluErrorString Tru64 produce an error string from a GL or GLU error code
gluerrorstring IRIX produce an error string from a GL or GLU error code
scan Tru64 produce a one-line-per-message scan listing (only available within the message handling system, mh)
mhl Tru64 produce formatted listings of MH messages (only available within the message handling system, mh)
strerror_r OpenBSD get error message string
kvm_geterr FreeBSD get error message on kvm descriptor
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service