CUBRID Engine  latest
cubload::error_handler Class Reference

#include <load_error_handler.hpp>

Collaboration diagram for cubload::error_handler:
Collaboration graph

Public Member Functions

 error_handler ()=default
 
 ~error_handler ()=default
 
template<typename... Args>
void on_error (MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 
void on_failure ()
 
void on_syntax_failure (bool use_scanner_line=false)
 
template<typename... Args>
void on_error_with_line (MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 
template<typename... Args>
void on_error_with_line (int lineno, MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 
template<typename... Args>
void on_failure (MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 
template<typename... Args>
void on_failure_with_line (MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 
template<typename... Args>
void log_date_time_conversion_error (Args &&...args)
 
bool current_line_has_error ()
 
void set_error_on_current_line (bool has_error)
 
int get_driver_lineno ()
 
int get_scanner_lineno ()
 

Static Public Member Functions

template<typename... Args>
static std::string format_log_msg (MSGCAT_LOADDB_MSG msg_id, Args &&...args)
 

Private Member Functions

void log_error_message (std::string &err_msg, bool fail, bool is_syntax_error=false)
 
bool is_last_error_filtered ()
 

Static Private Member Functions

template<typename... Args>
static std::string format (const char *fmt, Args &&...args)
 
static char * get_message_from_catalog (MSGCAT_LOADDB_MSG msg_id)
 

Private Attributes

bool m_current_line_has_error
 

Detailed Description

Definition at line 38 of file load_error_handler.hpp.

Constructor & Destructor Documentation

cubload::error_handler::error_handler ( )
default
cubload::error_handler::~error_handler ( )
default

Member Function Documentation

bool cubload::error_handler::current_line_has_error ( )

Definition at line 179 of file load_error_handler.cpp.

Referenced by cubload::server_object_loader::finish_line().

Here is the caller graph for this function:

template<typename... Args>
std::string cubload::error_handler::format ( const char *  fmt,
Args &&...  args 
)
staticprivate

Definition at line 193 of file load_error_handler.hpp.

References NULL.

Referenced by format_log_msg(), log_date_time_conversion_error(), on_error(), on_error_with_line(), on_failure(), and on_failure_with_line().

Here is the caller graph for this function:

template<typename... Args>
std::string cubload::error_handler::format_log_msg ( MSGCAT_LOADDB_MSG  msg_id,
Args &&...  args 
)
static

Definition at line 218 of file load_error_handler.hpp.

References format(), and get_message_from_catalog().

Referenced by cubload::session::append_log_msg().

Here is the caller graph for this function:

int cubload::error_handler::get_driver_lineno ( )
char * cubload::error_handler::get_message_from_catalog ( MSGCAT_LOADDB_MSG  msg_id)
staticprivate
int cubload::error_handler::get_scanner_lineno ( )

Definition at line 59 of file load_error_handler.cpp.

References assert, cubthread::get_entry(), cubload::driver::get_scanner(), cubthread::entry::m_loaddb_driver, and NULL.

Referenced by cubload::scanner::LexerError().

Here is the caller graph for this function:

bool cubload::error_handler::is_last_error_filtered ( )
private

Definition at line 159 of file load_error_handler.cpp.

References er_clear(), er_errid(), and err.

Referenced by on_failure(), and on_failure_with_line().

Here is the caller graph for this function:

template<typename... Args>
void cubload::error_handler::log_date_time_conversion_error ( Args &&...  args)
void cubload::error_handler::log_error_message ( std::string &  err_msg,
bool  fail,
bool  is_syntax_error = false 
)
private
template<typename... Args>
void cubload::error_handler::on_error ( MSGCAT_LOADDB_MSG  msg_id,
Args &&...  args 
)

Definition at line 126 of file load_error_handler.hpp.

References format(), get_message_from_catalog(), and log_error_message().

Referenced by on_error_with_line(), and cubload::session::session().

Here is the caller graph for this function:

template<typename... Args>
void cubload::error_handler::on_error_with_line ( MSGCAT_LOADDB_MSG  msg_id,
Args &&...  args 
)
template<typename... Args>
void cubload::error_handler::on_error_with_line ( int  lineno,
MSGCAT_LOADDB_MSG  msg_id,
Args &&...  args 
)
template<typename... Args>
void cubload::error_handler::on_failure ( MSGCAT_LOADDB_MSG  msg_id,
Args &&...  args 
)
void cubload::error_handler::on_syntax_failure ( bool  use_scanner_line = false)

Definition at line 84 of file load_error_handler.cpp.

References er_clear(), and er_msg().

Referenced by cubload::server_class_installer::install_class(), cubload::scanner::LexerError(), and cubload::server_object_loader::process_line().

Here is the caller graph for this function:

void cubload::error_handler::set_error_on_current_line ( bool  has_error)

Definition at line 185 of file load_error_handler.cpp.

Referenced by cubload::server_object_loader::finish_line().

Here is the caller graph for this function:

Member Data Documentation

bool cubload::error_handler::m_current_line_has_error
private

Definition at line 105 of file load_error_handler.hpp.


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