⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 t_error.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>t_error</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4>NAME</h4><blockquote>t_error - produce error message</blockquote><h4>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="xti.h.html">xti.h</a>&gt;int t_error(    const char *errmsg)</code></pre></blockquote><h4>DESCRIPTION</h4><blockquote><pre><P><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Parameters</b><th align=center><b>Before call</b><th align=center><b>After call</b><tr valign=top><td align=left>errmsg<td align=center>x<td align=center>=</table></pre><p>The<i>t_error()</i>function produces a message on the standard error outputwhich describes the last error encountered during a call to a transportfunction.The argument string<I>errmsg</I>is a user-supplied error message that gives context tothe error.<p>The error message is written as follows: first (if <I>errmsg</I> isnot a null pointer and the character pointed to be <I>errmsg</I> is notthe null character) the string pointed to by <I>errmsg</I> followed bya colon and a space; then a standard error message string for thecurrent error defined in <I>t_errno</I>.  If <I>t_errno</I>has a value different from [TSYSERR], the standard errormessage string is followed by a newline character.  If, however,<I>t_errno</I> is equal to [TSYSERR], the <I>t_errno</I> stringis followed bythe standard errormessage string for the current error defined in <I>errno</I>followed by a newline.<p>The language for error message strings written by <I>t_error()</I> isthat of the current locale.  If it is English, the error messagestring describing the value in <I>t_errno</I> may be derived fromthe commentsfollowing the <I>t_errno</I> codes defined in <B>xti.h</B>.  The contents ofthe error message strings describing the value in <I>errno</I> are thesame as those returned by the <I>strerror(3C)</I> function withan argument of <I>errno</I>.<p>The error number,<I>t_errno</I>,is only set when an error occurs and it is not clearedon successful calls.</blockquote><h4>EXAMPLE</h4><blockquote>If a<i><a href="t_connect.html">t_connect()</a></i>function fails on transport endpoint<I>fd2</I>because a bad address was given, the following callmight follow the failure:<pre><code>t_error("t_connect failed on fd2");</code></pre><p>The diagnostic message to be printed would look like:<pre><code>t_connect failed on fd2: incorrect addr format</code></pre><p>where <I>incorrect addr format</I> identifies thespecific error that occurred,and <I>t_connect failed on fd2</I> tells the user which function failed onwhich transport endpoint.</blockquote><h4>VALID STATES</h4><blockquote>All - apart from T_UNINIT</blockquote><h4>ERRORS</h4><blockquote>No errors are defined for the<i>t_error()</i>function.</blockquote><h4>RETURN VALUE</h4><blockquote>Upon completion, a value of 0 is returned.<br></blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -