![]() |
EM-ODP 4.4.0
Event Machine on ODP
|
#include <stdarg.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <odp_api.h>#include <event_machine.h>#include "em_mem.h"

Go to the source code of this file.
Macros | |
| #define | INTERNAL_ERROR(error, escope, fmt, ...) |
| #define | RETURN_ERROR_IF(cond, error, escope, fmt, ...) |
| #define | EM_LOG(level, fmt, ...) |
| #define | EM_VLOG(level, fmt, args) |
| #define | EM_PRINT(fmt, ...) EM_LOG(EM_LOG_PRINT, fmt, ## __VA_ARGS__) |
| #define | EM_DBG(em_dbg_flag, fmt, ...) |
| #define | DBG_PRINT(fmt, ...) EM_DBG(EM_DEBUG_PRINT_BASE, fmt, ## __VA_ARGS__) |
Functions | |
| const char * | err_status_str (em_status_t status) |
| const char * | escope_api_str (em_escope_t escope) |
| const char * | escope_internal_str (em_escope_t escope) |
| const char * | escope_addon_api_str (em_escope_t escope) |
| size_t | format_errmsg (em_status_t error, em_escope_t escope, const char *eo_str, va_list args, bool early_mode, char err_msg[], size_t errmsg_sz) |
| em_status_t | internal_error (em_status_t error, em_escope_t escope,...) |
| em_status_t | early_log_init (em_log_func_t user_log_fn, em_vlog_func_t user_vlog_fn) |
| void | log_init (void) |
| void | error_init (void) |
| em_status_t | default_error_handler (em_eo_t eo, em_status_t error, em_escope_t escope, va_list args) |
| em_status_t | select_error_handler (em_status_t error, em_escope_t escope, va_list args_list) |
| uint64_t | load_global_err_cnt (void) |
| int | default_log (em_log_level_t level, const char *fmt,...) |
| int | vdefault_log (em_log_level_t level, const char *fmt, va_list args) |
Event Machine Error Handler functions
Definition in file em_error.h.
| #define DBG_PRINT | ( | fmt, | |
| ... | |||
| ) | EM_DBG(EM_DEBUG_PRINT_BASE, fmt, ## __VA_ARGS__) |
Definition at line 105 of file em_error.h.
| #define EM_DBG | ( | em_dbg_flag, | |
| fmt, | |||
| ... | |||
| ) |
Definition at line 96 of file em_error.h.
| #define EM_LOG | ( | level, | |
| fmt, | |||
| ... | |||
| ) |
Definition at line 73 of file em_error.h.
| #define EM_PRINT | ( | fmt, | |
| ... | |||
| ) | EM_LOG(EM_LOG_PRINT, fmt, ## __VA_ARGS__) |
Definition at line 91 of file em_error.h.
| #define EM_VLOG | ( | level, | |
| fmt, | |||
| args | |||
| ) |
Definition at line 82 of file em_error.h.
| #define INTERNAL_ERROR | ( | error, | |
| escope, | |||
| fmt, | |||
| ... | |||
| ) |
Internal error reporting macro
Definition at line 58 of file em_error.h.
| #define RETURN_ERROR_IF | ( | cond, | |
| error, | |||
| escope, | |||
| fmt, | |||
| ... | |||
| ) |
Internal macro for return on error
Definition at line 65 of file em_error.h.
| em_status_t default_error_handler | ( | em_eo_t | eo, |
| em_status_t | error, | ||
| em_escope_t | escope, | ||
| va_list | args | ||
| ) |
Default EM Error Handler
The default error handler is called upon error if the application(s) have not registered their own global and/or EO-specific error handlers
| eo | EO reporting the error (if applicable) |
| error | The error code (reason), see em_status_e |
| escope | The error scope from within the error was reported, also tells whether the error was EM internal or application specific |
| args | va_list of args |
Definition at line 673 of file em_error.c.
| int default_log | ( | em_log_level_t | level, |
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 595 of file em_error.c.
| em_status_t early_log_init | ( | em_log_func_t | user_log_fn, |
| em_vlog_func_t | user_vlog_fn | ||
| ) |
Definition at line 831 of file em_error.c.
| const char * err_status_str | ( | em_status_t | status | ) |
Definition at line 427 of file em_error.c.
| void error_init | ( | void | ) |
Initialize the EM Error Handling
Definition at line 819 of file em_error.c.
| const char * escope_addon_api_str | ( | em_escope_t | escope | ) |
Definition at line 460 of file em_error.c.
| const char * escope_api_str | ( | em_escope_t | escope | ) |
Definition at line 436 of file em_error.c.
| const char * escope_internal_str | ( | em_escope_t | escope | ) |
Definition at line 448 of file em_error.c.
| size_t format_errmsg | ( | em_status_t | error, |
| em_escope_t | escope, | ||
| const char * | eo_str, | ||
| va_list | args, | ||
| bool | early_mode, | ||
| char | err_msg[], | ||
| size_t | errmsg_sz | ||
| ) |
Definition at line 478 of file em_error.c.
| em_status_t internal_error | ( | em_status_t | error, |
| em_escope_t | escope, | ||
| ... | |||
| ) |
EM internal error Don't call directly, should always be used from within the error-macros
Called ONLY from INTERNAL_ERROR macro - do not use for anything else! internal_error((error), (escope), FILE, func, LINE, (user_fmt), ## VA_ARGS)
Definition at line 797 of file em_error.c.
| uint64_t load_global_err_cnt | ( | void | ) |
Definition at line 568 of file em_error.c.
| void log_init | ( | void | ) |
Definition at line 849 of file em_error.c.
| em_status_t select_error_handler | ( | em_status_t | error, |
| em_escope_t | escope, | ||
| va_list | args_list | ||
| ) |
Select and call an error handler.
| error | Error code |
| escope | Error scope. Identifies the scope for interpreting the error code and variable arguments. |
| args_list | Variable number and type of arguments |
Definition at line 732 of file em_error.c.
| int vdefault_log | ( | em_log_level_t | level, |
| const char * | fmt, | ||
| va_list | args | ||
| ) |
Definition at line 574 of file em_error.c.