Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_error(3N) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

t_strerror(3N)






       t_error(3N)                                              t_error(3N)


       NAME
             t_error - write an error message

       SYNOPSIS
             cc [options] file -lnsl
             #include <xti.h>
             int t_error(char *errmsg);
             extern int t_errno;
             extern const char *t_errlist[];
             extern const int t_nerr;

          Parameters
             errmsg   a user-supplied error message that gives context to
                      the error.

             t_errno  index to a user-specified message array.

             t_errlist
                      points to the array of user-supplied message strings.

             t_nerr   maximum number of messages in the user-specified
                      message array.

       DESCRIPTION
             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.

             t_errlist and t_nerr are maintained for compatibility and
             should not be used.  In their place use t_strerror.

          Return Values
             Upon completion, a value of 0 is returned.  No errors are
             defined.

          State Transitions
             t_error may be issued from any valid state except T_UNINIT and
             has no effect on the entry state at exit.


                           Copyright 1994 Novell, Inc.               Page 1













      t_error(3N)                                              t_error(3N)


         Files
            /usr/lib/libxti.so
                              X/Open Transport Interface Library (shared
                              object)
            /usr/lib/libnsl.so
                              Network Services Library (shared object)
            /usr/lib/locale/locale/LC_MESSAGES/uxnsl

      USAGE
            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 intro(2)].

         Examples
            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

            where "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.

      REFERENCES
            intro(2), t_strerror(3N)













                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026