Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

T_ERROR(3N)                                                        T_ERROR(3N)

       t_error - produce error message

       #include <&lt;tiuser.h>&gt;

       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  func-
       tion.  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 cur-
       rent error defined in t_errno.  To simplify variant formatting of  mes-
       sages,  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 success-
       ful calls.

       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.

                                21 January 1990                    T_ERROR(3N)