code: private void mapJournalsAndReportErrors(
        JournalClosure closure, String status) throws IOException{
      List<JournalAndStream> badJAS = null;
      for (JournalAndStream jas : journals) {
        try {
          closure.apply(jas);
        } catch (Throwable t) {
          if (badJAS == null)
            badJAS = new LinkedList<JournalAndStream>();
          LOG.error("Error: " + status + " failed for (journal " + jas + ")", t);
          badJAS.add(jas);
        }
      }
      disableAndReportErrorOnJournals(badJAS, status);
    }
docs: Apply the given operation across all of the journal managers, disabling
  any for which the closure throws an IOException.
  @param closure {@link JournalClosure} object encapsulating the operation.
  @param status message used for logging errors (e.g. "opening journal")
  @throws IOException If the operation fails on all the journals.