File error_manager.h
FileList > base > error_manager.h
Go to the source code of this file
#include "config.h"
#include <stdarg.h>
#include <assert.h>
#include <pthread.h>
#include "error_code.h"
Namespaces
Classes
Public Types
Public Functions
| Type |
Name |
| void |
_er_log_debug (const char * file_name, const int line_no, const char * fmt, ...)
|
| void * |
db_default_malloc_handler (void * arg, const char * filename, int line_no, size_t size)
|
| void |
er_all (int * err_id, int * severity, int * nlevels, int * line_no, const char ** file_name, const char ** msg)
|
| void |
er_clear (void)
|
| void |
er_clearid (void)
|
| int |
er_errid (void)
|
| int |
er_errid_if_has_error (void)
|
| int |
er_event_restart (void)
|
| void |
er_file_create_link_to_current_log_file (const char * er_file_path, const char * suffix)
|
| void |
er_final (ER_FINAL_CODE do_global_final)
|
| char * |
er_get_area_error (char * buffer, int * length)
|
| char * |
er_get_ermsg_from_area_error (char * buffer)
|
| const char * |
er_get_msglog_filename (void)
|
| int |
er_get_severity (void)
|
| bool |
er_has_error (void)
|
| int |
er_init (const char * msglog_filename, int exit_ask)
|
| bool |
er_is_initialized (void)
|
| const char * |
er_msg (void)
|
| void |
er_print_callstack (const char * file_name, const int line_no, const char * fmt, ...)
|
| void |
er_print_crash_callstack (int sig)
|
| er_log_handler_t |
er_register_log_handler (er_log_handler_t f)
|
| void |
er_restore_last_error (void)
|
| void |
er_set (int severity, const char * file_name, const int line_no, int err_id, int num_args, ...)
|
| int |
er_set_area_error (char * server_area)
|
| void |
er_set_ignore_uninit (bool ignore)
|
| void |
er_set_print_property (int print_console)
|
| void |
er_set_with_file (int severity, const char * file_name, const int line_no, int err_id, FILE * fp, int num_args, ...)
|
| void |
er_set_with_oserror (int severity, const char * file_name, const int line_no, int err_id, int num_args, ...)
|
| void |
er_setid (int err_id)
|
| void |
er_stack_clearall (void)
|
| void |
er_stack_pop (void)
|
| void |
er_stack_pop_and_keep_error (void)
|
| void |
er_stack_push (void)
|
| void |
er_stack_push_if_exists (void)
|
Macros
| Type |
Name |
| define |
ARG_FILE_LINE [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout)
|
| define |
ARG_FILE_LINE_FUNC [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_func\_\_**](broker__monitor_8c.md#function-timeout)
|
| define |
ASSERT_ERROR () [**assert**](malloc__2__8__3_8c.md#define-assert) ([**er\_errid**](error__manager_8c.md#function-er_errid) () != [**NO\_ERROR**](error__code_8h.md#define-no_error))
|
| define |
ASSERT_ERROR_AND_SET (error_code) /* multi line expression */
|
| define |
ASSERT_NO_ERROR () [**assert**](malloc__2__8__3_8c.md#define-assert) ([**er\_errid**](error__manager_8c.md#function-er_errid) () == [**NO\_ERROR**](error__code_8h.md#define-no_error));
|
| define |
ASSERT_NO_ERROR_OR_INTERRUPTED () [**assert**](malloc__2__8__3_8c.md#define-assert) ([**er\_errid**](error__manager_8c.md#function-er_errid) () == [**NO\_ERROR**](error__code_8h.md#define-no_error) \|\| [**er\_errid**](error__manager_8c.md#function-er_errid) () == [**ER\_INTERRUPTED**](error__code_8h.md#define-er_interrupted));
|
| define |
CUBERR_MANAGER_DLL
|
| define |
ERROR0 (error, code) /* multi line expression */
|
| define |
ERROR1 (error, code, arg1) /* multi line expression */
|
| define |
ERROR2 (error, code, arg1, arg2) /* multi line expression */
|
| define |
ERROR3 (error, code, arg1, arg2, arg3) /* multi line expression */
|
| define |
ERROR4 (error, code, arg1, arg2, arg3, arg4) /* multi line expression */
|
| define |
ERROR5 (error, code, arg1, arg2, arg3, arg4, arg5) /* multi line expression */
|
| define |
ERROR_SET_ERROR (error, code) /* multi line expression */
|
| define |
ERROR_SET_ERROR_1ARG (error, code, arg1) /* multi line expression */
|
| define |
ERROR_SET_ERROR_2ARGS (error, code, arg1, arg2) /* multi line expression */
|
| define |
ERROR_SET_ERROR_3ARGS (error, code, arg1, arg2, arg3) /* multi line expression */
|
| define |
ERROR_SET_ERROR_4ARGS (error, code, arg1, arg2, arg3, arg4) /* multi line expression */
|
| define |
ERROR_SET_ERROR_ONLY (code) /* multi line expression */
|
| define |
ERROR_SET_WARNING (error, code) /* multi line expression */
|
| define |
ERROR_SET_WARNING_1ARG (error, code, arg1) /* multi line expression */
|
| define |
ERROR_SET_WARNING_2ARGS (error, code, arg1, arg2) /* multi line expression */
|
| define |
ERROR_SET_WARNING_3ARGS (error, code, arg1, arg2, arg3) /* multi line expression */
|
| define |
ERROR_SET_WARNING_4ARGS (error, code, arg1, arg2, arg3, arg4) /* multi line expression */
|
| define |
ER_IS_ABORTED_DUE_TO_DEADLOCK (err) /* multi line expression */
|
| define |
ER_IS_LOCK_TIMEOUT_ERROR (err) /* multi line expression */
|
| define |
ER_IS_SERVER_DOWN_ERROR (err) /* multi line expression */
|
| define |
ER_SAFE_INIT (msg_file, exit_arg) [**cuberr::manager**](classcuberr_1_1manager.md) [**cuberr\_manager**](broker__monitor_8c.md#function-timeout) ([**msg\_file**](broker__monitor_8c.md#function-timeout), [**exit\_arg**](broker__monitor_8c.md#function-timeout))
|
| define |
NULL_LEVEL 0
|
| define |
assert_release (e) [**assert**](malloc__2__8__3_8c.md#define-assert)([**e**](broker__monitor_8c.md#function-timeout))
|
| define |
assert_release_error (e) [**assert**](malloc__2__8__3_8c.md#define-assert)([**e**](broker__monitor_8c.md#function-timeout))
|
| define |
assert_release_notify (e) [**assert\_release**](error__manager_8h.md#define-assert_release)([**e**](broker__monitor_8c.md#function-timeout))
|
| define |
er_log_debug (...) [**if**](dynamic__load_8c.md#function-if) ([**prm\_get\_bool\_value**](system__parameter_8h.md#function-prm_get_bool_value) (PRM\_ID\_ER\_LOG\_DEBUG)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug)([**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout))
|
Public Types Documentation
typedef ER_FINAL_CODE
typedef enum er_final_code ER_FINAL_CODE;
typedef PTR_FNERLOG
typedef void(* PTR_FNERLOG) (int err_id);
enum er_exit_ask
enum er_exit_ask {
ER_NEVER_EXIT = 0,
ER_EXIT_ASK = 1,
ER_EXIT_DONT_ASK = 2,
ER_ABORT = 3,
ER_EXIT_DEFAULT = ER_NEVER_EXIT
};
enum er_final_code
enum er_final_code {
ER_THREAD_FINAL = 0,
ER_ALL_FINAL = 1
};
enum er_level
enum er_level {
ER_LEVEL_SYSTEM,
ER_LEVEL_APPLICATION
};
typedef er_log_handler_t
typedef void(* er_log_handler_t) (unsigned int);
enum er_print_option
enum er_print_option {
ER_DO_NOT_PRINT = 0,
ER_PRINT_TO_CONSOLE = 1
};
enum er_severity
enum er_severity {
ER_FATAL_ERROR_SEVERITY,
ER_ERROR_SEVERITY,
ER_SYNTAX_ERROR_SEVERITY,
ER_WARNING_SEVERITY,
ER_NOTIFICATION_SEVERITY,
ER_MAX_SEVERITY = ER_NOTIFICATION_SEVERITY
};
Public Functions Documentation
function _er_log_debug
void _er_log_debug (
const char * file_name,
const int line_no,
const char * fmt,
...
)
function db_default_malloc_handler
void * db_default_malloc_handler (
void * arg,
const char * filename,
int line_no,
size_t size
)
function er_all
void er_all (
int * err_id,
int * severity,
int * nlevels,
int * line_no,
const char ** file_name,
const char ** msg
)
function er_clear
function er_clearid
function er_errid
function er_errid_if_has_error
int er_errid_if_has_error (
void
)
function er_event_restart
int er_event_restart (
void
)
function er_file_create_link_to_current_log_file
void er_file_create_link_to_current_log_file (
const char * er_file_path,
const char * suffix
)
function er_final
void er_final (
ER_FINAL_CODE do_global_final
)
function er_get_area_error
char * er_get_area_error (
char * buffer,
int * length
)
function er_get_ermsg_from_area_error
char * er_get_ermsg_from_area_error (
char * buffer
)
function er_get_msglog_filename
const char * er_get_msglog_filename (
void
)
function er_get_severity
int er_get_severity (
void
)
function er_has_error
bool er_has_error (
void
)
function er_init
int er_init (
const char * msglog_filename,
int exit_ask
)
function er_is_initialized
bool er_is_initialized (
void
)
function er_msg
const char * er_msg (
void
)
function er_print_callstack
void er_print_callstack (
const char * file_name,
const int line_no,
const char * fmt,
...
)
function er_print_crash_callstack
void er_print_crash_callstack (
int sig
)
function er_register_log_handler
er_log_handler_t er_register_log_handler (
er_log_handler_t f
)
function er_restore_last_error
void er_restore_last_error (
void
)
function er_set
void er_set (
int severity,
const char * file_name,
const int line_no,
int err_id,
int num_args,
...
)
function er_set_area_error
int er_set_area_error (
char * server_area
)
function er_set_ignore_uninit
void er_set_ignore_uninit (
bool ignore
)
function er_set_print_property
void er_set_print_property (
int print_console
)
function er_set_with_file
void er_set_with_file (
int severity,
const char * file_name,
const int line_no,
int err_id,
FILE * fp,
int num_args,
...
)
function er_set_with_oserror
void er_set_with_oserror (
int severity,
const char * file_name,
const int line_no,
int err_id,
int num_args,
...
)
function er_setid
void er_setid (
int err_id
)
function er_stack_clearall
void er_stack_clearall (
void
)
function er_stack_pop
void er_stack_pop (
void
)
function er_stack_pop_and_keep_error
void er_stack_pop_and_keep_error (
void
)
function er_stack_push
void er_stack_push (
void
)
function er_stack_push_if_exists
void er_stack_push_if_exists (
void
)
Macro Definition Documentation
define ARG_FILE_LINE
#define ARG_FILE_LINE `__FILE__ , __LINE__`
define ARG_FILE_LINE_FUNC
#define ARG_FILE_LINE_FUNC `__FILE__ , __LINE__ , __func__`
define ASSERT_ERROR
#define ASSERT_ERROR (
) `assert ( er_errid () != NO_ERROR )`
define ASSERT_ERROR_AND_SET
#define ASSERT_ERROR_AND_SET (
error_code
) `/* multi line expression */`
define ASSERT_NO_ERROR
#define ASSERT_NO_ERROR (
) `assert ( er_errid () == NO_ERROR );`
define ASSERT_NO_ERROR_OR_INTERRUPTED
#define ASSERT_NO_ERROR_OR_INTERRUPTED (
) `assert ( er_errid () == NO_ERROR || er_errid () == ER_INTERRUPTED );`
define CUBERR_MANAGER_DLL
#define CUBERR_MANAGER_DLL
define ERROR0
#define ERROR0 (
error,
code
) `/* multi line expression */`
define ERROR1
#define ERROR1 (
error,
code,
arg1
) `/* multi line expression */`
define ERROR2
#define ERROR2 (
error,
code,
arg1,
arg2
) `/* multi line expression */`
define ERROR3
#define ERROR3 (
error,
code,
arg1,
arg2,
arg3
) `/* multi line expression */`
define ERROR4
#define ERROR4 (
error,
code,
arg1,
arg2,
arg3,
arg4
) `/* multi line expression */`
define ERROR5
#define ERROR5 (
error,
code,
arg1,
arg2,
arg3,
arg4,
arg5
) `/* multi line expression */`
define ERROR_SET_ERROR
#define ERROR_SET_ERROR (
error,
code
) `/* multi line expression */`
define ERROR_SET_ERROR_1ARG
#define ERROR_SET_ERROR_1ARG (
error,
code,
arg1
) `/* multi line expression */`
define ERROR_SET_ERROR_2ARGS
#define ERROR_SET_ERROR_2ARGS (
error,
code,
arg1,
arg2
) `/* multi line expression */`
define ERROR_SET_ERROR_3ARGS
#define ERROR_SET_ERROR_3ARGS (
error,
code,
arg1,
arg2,
arg3
) `/* multi line expression */`
define ERROR_SET_ERROR_4ARGS
#define ERROR_SET_ERROR_4ARGS (
error,
code,
arg1,
arg2,
arg3,
arg4
) `/* multi line expression */`
define ERROR_SET_ERROR_ONLY
#define ERROR_SET_ERROR_ONLY (
code
) `/* multi line expression */`
define ERROR_SET_WARNING
#define ERROR_SET_WARNING (
error,
code
) `/* multi line expression */`
define ERROR_SET_WARNING_1ARG
#define ERROR_SET_WARNING_1ARG (
error,
code,
arg1
) `/* multi line expression */`
define ERROR_SET_WARNING_2ARGS
#define ERROR_SET_WARNING_2ARGS (
error,
code,
arg1,
arg2
) `/* multi line expression */`
define ERROR_SET_WARNING_3ARGS
#define ERROR_SET_WARNING_3ARGS (
error,
code,
arg1,
arg2,
arg3
) `/* multi line expression */`
define ERROR_SET_WARNING_4ARGS
#define ERROR_SET_WARNING_4ARGS (
error,
code,
arg1,
arg2,
arg3,
arg4
) `/* multi line expression */`
define ER_IS_ABORTED_DUE_TO_DEADLOCK
#define ER_IS_ABORTED_DUE_TO_DEADLOCK (
err
) `/* multi line expression */`
define ER_IS_LOCK_TIMEOUT_ERROR
#define ER_IS_LOCK_TIMEOUT_ERROR (
err
) `/* multi line expression */`
define ER_IS_SERVER_DOWN_ERROR
#define ER_IS_SERVER_DOWN_ERROR (
err
) `/* multi line expression */`
define ER_SAFE_INIT
#define ER_SAFE_INIT (
msg_file,
exit_arg
) `cuberr::manager cuberr_manager ( msg_file , exit_arg )`
define NULL_LEVEL
define assert_release
#define assert_release (
e
) `assert ( e )`
define assert_release_error
#define assert_release_error (
e
) `assert ( e )`
define assert_release_notify
#define assert_release_notify (
e
) `assert_release ( e )`
define er_log_debug
#define er_log_debug (
...
) `if ( prm_get_bool_value ( PRM_ID_ER_LOG_DEBUG )) _er_log_debug ( __VA_ARGS__ )`
The documentation for this class was generated from the following file cubrid/src/base/error_manager.h