## err

#### OS/161 Reference Manual

### Name

err, errx, verr, verrx - print error messages

### Library

Standard C Library (libc, -lc)

### Synopsis

`#include <err.h>`
`void`
`err(int` exitcode`, const char *`format`, ...);`
`void`
`errx(int` exitcode`, const char *`format`, ...);`
`void`
`verr(int` exitcode`, const char *`format`, va_list);`
`void`
`verrx(int` exitcode`, const char *`format`, va_list);`

### Description

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

`errx` prints the name of the program, a colon, the text generated by passing format and subsequent args through printf, and a newline. Then, exit is called and passed the supplied exitcode.

`err` does the same thing, except that a colon and the error string for the current error (obtained by calling strerror on errno) are printed prior to the newline.

`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 stdarg facility.

### See Also

warn