11.1.3 BaseExceptionInterceptor

You develop an exception interceptor first by creating a subclass of the BaseExceptionInterceptor class. You must override the InterceptException() method. You can also override the Init() method to do some one-time initialization.

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 the exception.

For full usage and examples, see Section 6.13, “Using the Connector/Net Interceptor Classes”.

Download this Manual
PDF (US Ltr) - 5.5Mb
PDF (A4) - 5.5Mb
EPUB - 4.7Mb
HTML Download (TGZ) - 4.6Mb
HTML Download (Zip) - 4.6Mb
User Comments
Sign Up Login You must be logged in to post a comment.