Back to home page

Enduro/X

 
 

    


0001 TPSTRERROR(3)
0002 =============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpstrerror - Return the description for error
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 char * tpstrerror (int 'err');
0016 
0017 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 Function returns string description of given error code. Enduro/X also loggs additional information for last error state, and that information is returned in string format together with description of 'err'. Typically when error occurs, then programmer calls *tpstrerror(tperrno)*, thus function will closely describe what was happened. However if programmer calls *tpstrerror()* with other error code, then message will contain the description of 'err' plus last XATMI call's logged error info. Then message and *tperrno* infos are stored in thread local storage (TLS).
0024 
0025 RETURN VALUE
0026 ------------
0027 String containing formatted error code description plus last call's error logged info. For example:
0028 
0029 ---------------------------------------------------------------------
0030 
0031 ...
0032     /* call the service now! */
0033     if (SUCCEED!=tpcall("NONEXISTSVC", (char *)p_ub, 0L, (char **)&p_ub_ret, &rsp_len, 0L))
0034     {
0035         ret=FAIL;
0036 
0037         /* print the result */
0038         fprintf(stderr, "%s\n", tpstrerror(tperrno));
0039     }
0040 ...
0041 
0042 /* Will result with this on stderr putput
0043 6:TPENOENT (last error 6: _tpacall: Service is not available NONEXISTSVC by shm)
0044 */
0045 
0046 ---------------------------------------------------------------------
0047 
0048 
0049 ERRORS
0050 ------
0051 Function does not return any errors.
0052 
0053 
0054 EXAMPLE
0055 -------
0056 See *atmitest/test003_basicconvers/atmisv3.c* for sample code.
0057 
0058 BUGS
0059 ----
0060 Report bugs to support@mavimax.com
0061 
0062 SEE ALSO
0063 --------
0064 *tpcommit(3)* *tpstrerror(3)* *tpopen(3)* *tpsuspend(3)* *tpresume(3)*
0065 
0066 COPYING
0067 -------
0068 (C) Mavimax, Ltd
0069