You develop an exception interceptor first by creating a
subclass of the
class. You must override the
InterceptException() method. You can also
Init() method to do some
Each exception interceptor has 2 methods:
public abstract Exception InterceptException(Exception exception, MySqlConnection connection); public virtual void Init(MySqlConnection connection);
The connection passed to
Init() is the
connection that is attached to this interceptor.
Each interceptor is required to override
InterceptException and return an exception.
It can return the exception it is given, or it can wrap it in a
new exception. We currently do not offer the ability to suppress
For full usage and examples, see Section 6.12, “Using the Connector/Net Interceptor Classes”.