@Override public void shutdown() throws IOException { // save the last exception and rethrow IOException failure = null; for (WALProvider provider : cached.values()) { try { provider.shutdown(); } catch (IOException exception) { LOG.error("Problem shutting down provider '" + provider + "': " + exception.getMessage()); LOG.debug("Details of problem shutting down provider '" + provider + "'", exception); failure = exception; } } if (failure != null) { throw failure; } }