print_error()
#
The print_error()
function prints an error message to stdout and syslog, and optionally exits or aborts the program based on the specified flag.
Prototype
void print_error(
pe_flag_t quit,
const char *fmt,
...
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Determines the behavior after printing the error message. Possible values: |
|
|
The format string for the error message, similar to |
|
|
Additional arguments corresponding to the format specifiers in |
Return Value
This function does not return a value.
Notes
If quit
is set to PEF_ABORT
, the function will call abort()
. If quit
is set to PEF_EXIT
, the function will call exit(-1)
. The function also logs the error message to syslog on Linux systems.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples