err 2.0.0
Small error-printing library written in C
|
Header file. More...
#include <stdarg.h>
Go to the source code of this file.
Functions | |
void | vwarn (const char *, va_list) |
Prints a formatted warning message to stderr. More... | |
void | vewarn (const char *, va_list) |
Prints a formatted error message to stderr. More... | |
void | verr (const char *, va_list) |
Prints a formatted error message to stderr and exits. More... | |
void | verrc (const int, const char *, va_list) |
Prints a formatted error message to stderr and exits with the given exit code. More... | |
void | warn (const char *,...) |
Prints a formatted warning message to stderr. More... | |
void | ewarn (const char *,...) |
Prints a formatted error message to stderr. More... | |
void | err (const char *,...) |
Prints a formatted error message to stderr and exits. More... | |
void | errc (const int, const char *,...) |
Prints a formatted error message to stderr and exits with the given exit code. More... | |
Variables | |
char * | program_invocation_name |
Global value for the program's name. More... | |
void err | ( | const char * | fmt, |
... | |||
) |
Prints a formatted error message to stderr and exits.
fmt | format string |
... | arguments for the format string |
Variadic wrapper for verr().
Definition at line 123 of file err.c.
void errc | ( | const int | code, |
const char * | fmt, | ||
... | |||
) |
Prints a formatted error message to stderr and exits with the given exit code.
code | exit code |
fmt | format string |
... | arguments for the format string |
Variadic wrapper for verrc().
Definition at line 110 of file err.c.
void ewarn | ( | const char * | fmt, |
... | |||
) |
Prints a formatted error message to stderr.
fmt | format string |
... | arguments for the format string |
Variadic wrapper for vewarn().
Definition at line 97 of file err.c.
void verr | ( | const char * | fmt, |
va_list | ap | ||
) |
Prints a formatted error message to stderr and exits.
fmt | format string |
ap | va_list of arguments for the format string |
Calls verrc() with EXIT_FAILURE.
Definition at line 75 of file err.c.
void verrc | ( | const int | code, |
const char * | fmt, | ||
va_list | ap | ||
) |
Prints a formatted error message to stderr and exits with the given exit code.
code | exit code |
fmt | format string |
ap | va_list of arguments for the format string |
Calls vewarn() and exits the program with the provided code.
Definition at line 64 of file err.c.
void vewarn | ( | const char * | fmt, |
va_list | ap | ||
) |
Prints a formatted error message to stderr.
fmt | format string |
ap | va_list of arguments for the format string |
Calls vwarn(), then prints ": ", strerror(errno), and a newline.
Definition at line 46 of file err.c.
void vwarn | ( | const char * | fmt, |
va_list | ap | ||
) |
Prints a formatted warning message to stderr.
fmt | format string |
ap | va_list of arguments for the format string |
Prints program_invocation_name, ": ", and the printf(3)-like-formatted error message.
Definition at line 36 of file err.c.
void warn | ( | const char * | fmt, |
... | |||
) |