Package com.mysql.cj.exceptions
Class ExceptionInterceptorChain
java.lang.Object
com.mysql.cj.exceptions.ExceptionInterceptorChain
- All Implemented Interfaces:
ExceptionInterceptor
public class ExceptionInterceptorChain extends java.lang.Object implements ExceptionInterceptor
-
Constructor Summary
Constructors Constructor Description ExceptionInterceptorChain(java.lang.String interceptorClasses, java.util.Properties props, Log log) -
Method Summary
Modifier and Type Method Description voidaddRingZero(ExceptionInterceptor interceptor)voiddestroy()Called by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.java.util.List<ExceptionInterceptor>getInterceptors()ExceptionInterceptorinit(java.util.Properties properties, Log log)Called once per connection that wants to use the extension The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().java.lang.ExceptioninterceptException(java.lang.Exception sqlEx)
-
Constructor Details
-
ExceptionInterceptorChain
public ExceptionInterceptorChain(java.lang.String interceptorClasses, java.util.Properties props, Log log)
-
-
Method Details
-
addRingZero
-
interceptException
public java.lang.Exception interceptException(java.lang.Exception sqlEx)- Specified by:
interceptExceptionin interfaceExceptionInterceptor
-
destroy
public void destroy()Description copied from interface:ExceptionInterceptorCalled by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.- Specified by:
destroyin interfaceExceptionInterceptor
-
init
Description copied from interface:ExceptionInterceptorCalled once per connection that wants to use the extension The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().- Specified by:
initin interfaceExceptionInterceptor- Parameters:
properties- configuration values as passed to the connection. Note that in order to support javax.sql.DataSources, configuration properties specific to an interceptor must be passed via setURL() on the DataSource. Extension properties are not exposed via accessor/mutator methods on DataSources.log- logger instance- Returns:
ExceptionInterceptor
-
getInterceptors
-