#include <tiuser.h>
void t_error(errmsg) char *errmsg;
extern int t_errno; extern char *t_errlist[]; extern int t_nerr;
t_error() produces a message on the standard error output which describes the last error received 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 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.
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.
[a manual with the abbreviation NETP]
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97