root/man/libc/err.html

/* [<][>][^][v][top][bottom][index][help] */
<html>
<head>
<title>err</title>
<body bgcolor=#ffffff>
<h2 align=center>err</h2>
<h4 align=center>OS/161 Reference Manual</h4>

<h3>Name</h3>
err - print error messages

<h3>Library</h3>
Standard C Library (libc, -lc)

<h3>Synopsis</h3>
#include &lt;err.h&gt;<br>
<br>
void<br>
err(int <em>exitcode</em>, const char *<em>format</em>, ...);<br>
<br>
void<br>
errx(int <em>exitcode</em>, const char *<em>format</em>, ...);<br>
<br>
void<br>
verr(int <em>exitcode</em>, const char *<em>format</em>, va_list);<br>
<br>
void<br>
verrx(int <em>exitcode</em>, const char *<em>format</em>, va_list);<br>

<h3>Description</h3>

The err, errx, verr, and verrx functions print error messages to
the standard error stream.
<p>

errx prints the name of the program, a colon, the text generated by
passing <em>format</em> and subsequent args through
<A HREF=printf.html>printf</A>, and a newline. Then,
<A HREF=exit.html>exit</A> is called and passed the supplied 
<em>exitcode</em>.
<p>

err does the same thing, except that a colon and the error string
for the current error (obtained by calling 
<A HREF=strerror.html>strerror</A> on 
<A HREF=../syscall/errno.html>errno</A>) are printed prior to the
newline.
<p>

verrx and verr are the same as errx and err respectively, except
that the additional arguments for printf are taken to have been
already packaged up in a va_list by use of the
<A HREF=stdarg.html>stdarg</A> facility.
<p>

<h3>See Also</h3>

<A HREF=warn.html>warn</A>

</body>
</html>

/* [<][>][^][v][top][bottom][index][help] */