Drizzled Public API Documentation

drizzled::Internal_error_handler Class Reference

#include <internal_error_handler.h>

Inheritance diagram for drizzled::Internal_error_handler:
drizzled::plugin::Ha_delete_table_error_handler

List of all members.

Public Member Functions

virtual bool handle_error (drizzled::error_t sql_errno, const char *message, DRIZZLE_ERROR::enum_warning_level level, Session *session)=0

Detailed Description

This class represents the interface for internal error handlers. Internal error handlers are exception handlers used by the server implementation.

Definition at line 33 of file internal_error_handler.h.


Member Function Documentation

virtual bool drizzled::Internal_error_handler::handle_error ( drizzled::error_t  sql_errno,
const char *  message,
DRIZZLE_ERROR::enum_warning_level  level,
Session session 
) [pure virtual]

Handle an error condition. This method can be implemented by a subclass to achieve any of the following:

  • mask an error internally, prevent exposing it to the user,
  • mask an error and throw another one instead. When this method returns true, the error condition is considered 'handled', and will not be propagated to upper layers. It is the responsability of the code installing an internal handler to then check for trapped conditions, and implement logic to recover from the anticipated conditions trapped during runtime.

This mechanism is similar to C++ try/throw/catch:

Parameters:
sql_errnothe error number
levelthe error level
sessionthe calling thread
Returns:
true if the error is handled

Implemented in drizzled::plugin::Ha_delete_table_error_handler.

Referenced by drizzled::Session::handle_error().


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