code: public static void closeAll(
              @Nonnull final Iterable<? extends Closeable> closeables,
              @Nonnull final Logger log
      ) {
          Throwable throwable = null;
          for (Closeable closeable : closeables) {
              try {
                  closeQuietly(closeable, log);
              } catch (Throwable e) {
                  if (throwable == null) {
                      throwable = e;
                  } else {
                      log.error("Suppressing throwable thrown when closing "+closeable, e);
                  }
              }
          }
          if (throwable != null) {
              throw Throwables.propagate(throwable);
          }
      }
docs: Close all {@link Closeable} objects provided in the {@code closeables}
  iterator. When encountering an error when closing, write the message out
  to the provided {@code log}.
  
  @param closeables The closeables that we want to close.
  @param log The log where we will write error messages when failing to
  close a closeable.