write an error message
cc [options] file -lnsl
int t_error(char *errmsg);
This function is a TLI/XTI local management routine used to generate
a message under error conditions.
t_error writes a message on the standard error file
describing the last error encountered
during a call to a TLI/XTI function.
The argument string errmsg is user supplied and
may be set to give context to the error.
The message returned by t_error prints in the following format:
the user-supplied error message followed by a colon and
the standard transport function error message for the current value
contained in t_errno.
a user-supplied error message that gives context to the error.
index to a user-specified message array.
points to the array of user-supplied message strings.
maximum number of messages in the user-specified message array.
t_error may be issued from any valid state except T_UNINIT
and has no effect on the entry state at exit.
X/Open® Transport Interface Library (shared object)
Network Services Library (shared object)
On return, t_errno is set only when an error occurs
and is not cleared on subsequent successful calls.
If the returned value of t_errno has been set to
TSYSERR, t_error will also print the standard error message
for the current value contained in errno (see
Upon completion, a value of 0 is returned.
No errors are defined.
Following a t_connect function call, which might fail on
a transport endpoint fd2 because a bad address was detected, a call
to t_error might be issued to check for a possible failure:
t_error("t_connect failed on fd2");
If the t_connect fails, t_errno is set to
the appropriate value, and the diagnostic message would print as:
t_connect failed on fd2: Incorrect transport address format
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.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005