List of usage examples for org.apache.commons.pool2 SwallowedExceptionListener onSwallowException
void onSwallowException(Exception e);
From source file:JDBCPool.dbcp.demo.sourcecode.BaseGenericObjectPool.java
/** * Swallows an exception and notifies the configured listener for swallowed * exceptions queue.// www. j a v a2s . c o m * * @param e exception to be swallowed */ final void swallowException(Exception e) { SwallowedExceptionListener listener = getSwallowedExceptionListener(); if (listener == null) { return; } try { listener.onSwallowException(e); } catch (OutOfMemoryError oome) { throw oome; } catch (VirtualMachineError vme) { throw vme; } catch (Throwable t) { // Ignore. Enjoy the irony. } }