up | Inhaltsverzeichniss | Kommentar

Manual page for T_ERROR(3N)

t_error - produce error message

SYNOPSIS

#include <tiuser.h>

void t_error(errmsg)
char *errmsg;

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

DESCRIPTION

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.

EXAMPLE

If a t_connect.3n 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

[a manual with the abbreviation NETP]


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97