clsync
Loading...
Searching...
No Matches
error.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BACKTRACE_LENGTH   256
 
#define DEBUGLEVEL_LIMIT   9
 
#define critical(...)
 
#define critical_on(cond)
 
#define error(...)
 
#define error_on(cond)
 
#define warning(...)
 
#define info(...)
 
#define debug(debug_level, ...)
 
#define error_or_debug(debug_level, ...)
 
#define debug_call(debug_level, code)
 
#define critical_or_warning(cond, ...)
 

Typedefs

typedef enum ipc_type ipc_type_t
 
typedef enum outputmethod outputmethod_t
 

Enumerations

enum  ipc_type { IPCT_PRIVATE , IPCT_SHARED }
 
enum  outputmethod { OM_STDERR = 0 , OM_STDOUT , OM_SYSLOG , OM_MAX }
 

Functions

void _critical (const char *const function_name, const char *fmt,...)
 
void _error (const char *const function_name, const char *fmt,...)
 
void _warning (const char *const function_name, const char *fmt,...)
 
void _info (const char *const function_name, const char *fmt,...)
 
void error_init (void *_outputmethod, int *_quiet, int *_verbose, int *_debug)
 
void error_init_ipc (ipc_type_t ipc_type)
 
void error_deinit ()
 

Macro Definition Documentation

◆ BACKTRACE_LENGTH

#define BACKTRACE_LENGTH   256

Definition at line 23 of file error.h.

◆ critical

#define critical ( ...)
Value:
_critical(__func__, __VA_ARGS__)
void _critical(const char *const function_name, const char *fmt,...)
Definition error.c:184

Definition at line 32 of file error.h.

◆ critical_on

#define critical_on ( cond)
Value:
{debug(30, "critical_on: checking: %s", TOSTR(cond)); if (unlikely(cond)) {critical("Assert: "TOSTR(cond));}}
#define critical(...)
Definition error.h:32
#define debug(debug_level,...)
Definition error.h:50
#define TOSTR(a)
Definition macros.h:44
#define unlikely(x)
Definition macros.h:29

Definition at line 33 of file error.h.

◆ critical_or_warning

#define critical_or_warning ( cond,
... )
Value:
((cond) ? _critical : _warning)(__func__, __VA_ARGS__)
void _warning(const char *const function_name, const char *fmt,...)
Definition error.c:298

Definition at line 57 of file error.h.

◆ debug

#define debug ( debug_level,
... )
Value:
{}

Definition at line 50 of file error.h.

◆ debug_call

#define debug_call ( debug_level,
code )
Value:
debug(debug_level, "%s -> %i", TOSTR(code), code)

Definition at line 55 of file error.h.

◆ DEBUGLEVEL_LIMIT

#define DEBUGLEVEL_LIMIT   9

Definition at line 28 of file error.h.

◆ error

#define error ( ...)
Value:
_error(__func__, __VA_ARGS__)
void _error(const char *const function_name, const char *fmt,...)
Definition error.c:238

Definition at line 36 of file error.h.

◆ error_on

#define error_on ( cond)
Value:
{if (unlikely(cond)) {error("Error: ("TOSTR(cond)") != 0");}}
#define error(...)
Definition error.h:36

Definition at line 37 of file error.h.

◆ error_or_debug

#define error_or_debug ( debug_level,
... )
Value:
((debug_level)<0 ? _error(__func__, __VA_ARGS__) : (void)0)

Definition at line 51 of file error.h.

◆ info

#define info ( ...)
Value:
_info(__func__, __VA_ARGS__)
void _info(const char *const function_name, const char *fmt,...)
Definition error.c:270

Definition at line 43 of file error.h.

◆ warning

#define warning ( ...)
Value:
_warning(__func__, __VA_ARGS__)

Definition at line 40 of file error.h.

Typedef Documentation

◆ ipc_type_t

typedef enum ipc_type ipc_type_t

Definition at line 63 of file error.h.

◆ outputmethod_t

Definition at line 76 of file error.h.

Enumeration Type Documentation

◆ ipc_type

enum ipc_type
Enumerator
IPCT_PRIVATE 
IPCT_SHARED 

Definition at line 59 of file error.h.

◆ outputmethod

Enumerator
OM_STDERR 
OM_STDOUT 
OM_SYSLOG 
OM_MAX 

Definition at line 69 of file error.h.

Function Documentation

◆ _critical()

void _critical ( const char *const function_name,
const char * fmt,
... )
extern

Definition at line 184 of file error.c.

Here is the call graph for this function:

◆ _error()

void _error ( const char *const function_name,
const char * fmt,
... )
extern

Definition at line 238 of file error.c.

Here is the call graph for this function:

◆ _info()

void _info ( const char *const function_name,
const char * fmt,
... )
extern

Definition at line 270 of file error.c.

Here is the call graph for this function:

◆ _warning()

void _warning ( const char *const function_name,
const char * fmt,
... )
extern

Definition at line 298 of file error.c.

Here is the call graph for this function:

◆ error_deinit()

void error_deinit ( )
extern

Definition at line 389 of file error.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ error_init()

void error_init ( void * _outputmethod,
int * _quiet,
int * _verbose,
int * _debug )
extern

Definition at line 356 of file error.c.

Here is the caller graph for this function:

◆ error_init_ipc()

void error_init_ipc ( ipc_type_t ipc_type)
extern

Definition at line 367 of file error.c.

Here is the call graph for this function:
Here is the caller graph for this function: