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."
- Warning
- Strange things happen when a result object outlives its parent connection. If you register an error handler on a connection, then you must not access the result after destroying the connection. This applies even if you destroy the error handler first!