MySQL 8.0.39
Source Code Documentation
|
Class template which derives from Internal_error_handler and overrides handle_condition with the CONDITION_HANDLER_CLOS template parameter. More...
#include <sdi_utils.h>
Public Member Functions | |
Closure_error_handler (CONDITION_HANDLER_CLOS &&ch) | |
Private Member Functions | |
bool | handle_condition (THD *, uint sql_errno, const char *sqlstate, Sql_condition::enum_severity_level *level, const char *msg) override |
Handle a sql condition. More... | |
Private Attributes | |
CONDITION_HANDLER_CLOS | m_ch |
Additional Inherited Members | |
Protected Member Functions inherited from Internal_error_handler | |
Internal_error_handler () | |
Internal_error_handler * | prev_internal_handler () const |
virtual | ~Internal_error_handler ()=default |
Class template which derives from Internal_error_handler and overrides handle_condition with the CONDITION_HANDLER_CLOS template parameter.
|
inlineexplicit |
|
inlineoverrideprivatevirtual |
Handle a sql condition.
This method can be implemented by a subclass to achieve any of the following:
This mechanism is similar to C++ try/throw/catch:
THD::push_internal_handler()
,my_error()
, which invokes my_message_sql()
,THD::pop_internal_handler()
.thd | the calling thread |
sql_errno | the error number for the condition raised. |
sqlstate | the SQLSTATE for the condition raised. |
level | the severity level for the condition raised. |
msg | the error message for the condition raised. |
Implements Internal_error_handler.
|
private |