TERROR(3N) DG/UX 4.30 TERROR(3N)
NAME
t_error - produce error message
SYNOPSIS
#include <tiuser.h>
void terror(errmsg)
char *errmsg;
extern int terrno;
extern char *terrlist[];
extern int tnerr;
DESCRIPTION
The terror function 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. terror prints the user-supplied error
message followed by a colon and a standard error message for
the current error defined in t_errno. To simplify variant
formatting of messages, the array of message strings
t_errlist is provided; t_errno can be used as an index in
this table to get the message string without the newline.
T_nerr is the largest message number provided for in the
t_errlist table.
T_errno is only set when an error occurs and is not cleared
on successful calls.
EXAMPLE
If a tconnect 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");
The diagnostic message to be printed would look like:
t_connect failed on fd2: Incorrect transport address format
where "Incorrect transport address format" identifies the
specific error that occurred, and "t_connect failed on fd2"
tells the user which function failed on which transport
endpoint.
SEE ALSO
intro(3), t_connect(3N).
Licensed material--property of copyright holder(s) Page 1