Base class for error-handler callbacks. More...
#include <errorhandler.hxx>
Public Member Functions | |
errorhandler (connection_base &) | |
virtual | ~errorhandler () |
virtual bool | operator() (const char msg[])=0 throw () |
Define in subclass: receive an error or warning message from the database. More... | |
Private Member Functions | |
errorhandler () | |
errorhandler (const errorhandler &) | |
errorhandler & | operator= (const errorhandler &) |
void | unregister () throw () |
Private Attributes | |
connection_base * | m_home |
Friends | |
class | internal::gate::errorhandler_connection_base |
Base class for error-handler callbacks.
To receive errors and warnings from a connection, subclass this with your own error-handler functor, and instantiate it for the connection. Destroying the handler un-registers it.
A connection can have multiple error handlers at the same time. When the database connection emits an error or warning message, it passes the message to each error handler, starting with the most recently registered one and progressing towards the oldest one. However an error handler may also instruct the connection not to pass the message to further handlers by returning "false."
|
explicit |
|
virtual |
|
private |
|
private |
|
pure virtual |
Define in subclass: receive an error or warning message from the database.
Implemented in pqxx::quiet_errorhandler.
|
private |
|
private |
|
friend |
|
private |