CUBRID Engine  latest
cuberr::context Class Reference

#include <error_context.hpp>

Collaboration diagram for cuberr::context:
Collaboration graph

Public Member Functions

 context (bool automatic_registration=false, bool logging=false)
 
 ~context ()
 
er_messageget_current_error_level (void)
 
void register_thread_local (void)
 
void deregister_thread_local (void)
 
void clear_current_error_level (void)
 
void push_error_stack (void)
 
void pop_error_stack (er_message &popped)
 
void pop_error_stack_and_destroy (void)
 
bool has_error_stack (void)
 
const boolget_logging (void)
 

Static Public Member Functions

static contextget_thread_local_context (void)
 
static er_messageget_thread_local_error (void)
 

Private Member Functions

void clear_all_levels (void)
 
void clear_stack (void)
 

Private Attributes

er_message m_base_level
 
std::stack< er_messagem_stack
 
bool m_automatic_registration
 
bool m_logging
 
bool m_destroyed
 

Detailed Description

Definition at line 76 of file error_context.hpp.

Constructor & Destructor Documentation

cuberr::context::context ( bool  automatic_registration = false,
bool  logging = false 
)

Definition at line 208 of file error_context.cpp.

References register_thread_local().

cuberr::context::~context ( void  )

Member Function Documentation

void cuberr::context::clear_all_levels ( void  )
private

Definition at line 315 of file error_context.cpp.

References cuberr::er_message::clear_error(), cuberr::er_message::clear_message_area(), clear_stack(), and m_base_level.

Referenced by deregister_thread_local().

Here is the caller graph for this function:

void cuberr::context::clear_current_error_level ( void  )
void cuberr::context::clear_stack ( void  )
private

Definition at line 323 of file error_context.cpp.

References m_stack.

Referenced by clear_all_levels().

Here is the caller graph for this function:

void cuberr::context::deregister_thread_local ( void  )

Definition at line 255 of file error_context.cpp.

References assert, clear_all_levels(), m_stack, and NULL.

Referenced by er_final(), cubthread::finalize(), cubthread::entry_manager::retire_context(), and ~context().

Here is the caller graph for this function:

er_message & cuberr::context::get_current_error_level ( void  )

Definition at line 235 of file error_context.cpp.

References m_base_level, and m_stack.

Referenced by clear_current_error_level(), er_set_internal(), er_stack_push_if_exists(), and get_thread_local_error().

Here is the caller graph for this function:

const bool & cuberr::context::get_logging ( void  )

Definition at line 309 of file error_context.cpp.

References m_logging.

Referenced by er_stack_pop_and_keep_error().

Here is the caller graph for this function:

cuberr::context & cuberr::context::get_thread_local_context ( void  )
static

Definition at line 330 of file error_context.cpp.

References assert, cubthread::get_entry(), cubthread::entry::get_error_context(), cubthread::get_manager(), NULL, and cuberr::tl_Context_p.

Referenced by get_thread_local_error().

Here is the caller graph for this function:

er_message & cuberr::context::get_thread_local_error ( void  )
static

Definition at line 348 of file error_context.cpp.

References get_current_error_level(), and get_thread_local_context().

Referenced by er_stack_pop_and_keep_error().

Here is the caller graph for this function:

bool cuberr::context::has_error_stack ( void  )

Definition at line 303 of file error_context.cpp.

References m_stack.

Referenced by er_restore_last_error(), er_stack_clearall(), er_stack_pop_and_keep_error(), and er_stack_push_if_exists().

Here is the caller graph for this function:

void cuberr::context::pop_error_stack ( er_message popped)

Definition at line 282 of file error_context.cpp.

References assert, m_stack, and cuberr::er_message::swap().

Referenced by er_stack_pop_and_keep_error(), and pop_error_stack_and_destroy().

Here is the caller graph for this function:

void cuberr::context::pop_error_stack_and_destroy ( void  )

Definition at line 294 of file error_context.cpp.

References m_logging, and pop_error_stack().

Referenced by er_set_internal().

Here is the caller graph for this function:

void cuberr::context::push_error_stack ( void  )

Definition at line 276 of file error_context.cpp.

References m_logging, and m_stack.

Referenced by er_set_internal(), and er_stack_push_if_exists().

Here is the caller graph for this function:

void cuberr::context::register_thread_local ( void  )

Definition at line 248 of file error_context.cpp.

References assert, and NULL.

Referenced by context(), cubthread::entry_manager::create_context(), er_init(), and cubthread::initialize().

Here is the caller graph for this function:

Member Data Documentation

bool cuberr::context::m_automatic_registration
private

Definition at line 112 of file error_context.hpp.

Referenced by ~context().

er_message cuberr::context::m_base_level
private

Definition at line 110 of file error_context.hpp.

Referenced by clear_all_levels(), and get_current_error_level().

bool cuberr::context::m_destroyed
private

Definition at line 114 of file error_context.hpp.

Referenced by ~context().

bool cuberr::context::m_logging
private

Definition at line 113 of file error_context.hpp.

Referenced by get_logging(), pop_error_stack_and_destroy(), and push_error_stack().

std::stack<er_message> cuberr::context::m_stack
private

The documentation for this class was generated from the following files: