CUBRID Engine
latest
|
#include <load_error_handler.hpp>
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 |
Definition at line 38 of file load_error_handler.hpp.
|
default |
|
default |
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().
|
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().
|
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().
int cubload::error_handler::get_driver_lineno | ( | ) |
Definition at line 49 of file load_error_handler.cpp.
References assert, cubthread::get_entry(), cubload::driver::get_start_line(), cubthread::entry::m_loaddb_driver, and NULL.
Referenced by log_date_time_conversion_error(), on_error_with_line(), and on_failure_with_line().
|
staticprivate |
Definition at line 68 of file load_error_handler.cpp.
References MSGCAT_CATALOG_UTILS, msgcat_message(), and MSGCAT_UTIL_SET_LOADDB.
Referenced by format_log_msg(), log_date_time_conversion_error(), on_error(), on_error_with_line(), on_failure(), and on_failure_with_line().
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().
|
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().
void cubload::error_handler::log_date_time_conversion_error | ( | Args &&... | args | ) |
Definition at line 206 of file load_error_handler.hpp.
References format(), get_driver_lineno(), get_message_from_catalog(), LOADDB_MSG_CONVERSION_ERROR, LOADDB_MSG_LINE, and log_error_message().
Referenced by cubload::server_object_loader::process_generic_constant().
|
private |
Definition at line 104 of file load_error_handler.cpp.
References er_errid(), er_get_severity(), er_has_error(), er_msg(), ER_WARNING_SEVERITY, ldr_increment_err_total(), ldr_increment_fails(), LOADDB_MSG_LINE, and NO_ERROR.
Referenced by log_date_time_conversion_error(), on_error(), on_error_with_line(), on_failure(), and on_failure_with_line().
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().
void cubload::error_handler::on_error_with_line | ( | MSGCAT_LOADDB_MSG | msg_id, |
Args &&... | args | ||
) |
Definition at line 134 of file load_error_handler.hpp.
References get_driver_lineno(), and on_error().
Referenced by cubload::load_task::execute(), cubload::scanner::LexerError(), cubload::server_object_loader::process_constant(), and cubload::server_class_installer::register_class_with_attributes().
void cubload::error_handler::on_error_with_line | ( | int | lineno, |
MSGCAT_LOADDB_MSG | msg_id, | ||
Args &&... | args | ||
) |
Definition at line 148 of file load_error_handler.hpp.
References format(), get_message_from_catalog(), LOADDB_MSG_LINE, and log_error_message().
void cubload::error_handler::on_failure | ( | ) |
Definition at line 74 of file load_error_handler.cpp.
Referenced by cubload::server_object_loader::finish_line(), cubload::server_object_loader::flush_records(), on_failure_with_line(), cubload::server_class_installer::register_class_with_attributes(), and cubload::server_object_loader::stop_scancache().
void cubload::error_handler::on_failure | ( | MSGCAT_LOADDB_MSG | msg_id, |
Args &&... | args | ||
) |
Definition at line 160 of file load_error_handler.hpp.
References format(), get_message_from_catalog(), is_last_error_filtered(), and log_error_message().
void cubload::error_handler::on_failure_with_line | ( | MSGCAT_LOADDB_MSG | msg_id, |
Args &&... | args | ||
) |
Definition at line 171 of file load_error_handler.hpp.
References format(), get_driver_lineno(), get_message_from_catalog(), is_last_error_filtered(), LOADDB_MSG_LINE, log_error_message(), and on_failure().
Referenced by cubload::server_class_installer::check_class(), cubload::load_task::execute(), cubload::server_object_loader::process_collection_constant(), cubload::server_object_loader::process_constant(), cubload::server_class_installer::register_class_with_attributes(), cubload::server_object_loader::start_attrinfo(), and cubload::server_object_loader::start_scancache().
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().
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().
|
private |
Definition at line 105 of file load_error_handler.hpp.