code: @Override
    public void close() {
      try {
        closeFunction.close(resource);
      } catch (Exception e) {
        Exceptions.throwChecked(e);
      }
    }
docs: Throws any exception thrown by {@link CloseFunction#close(Object)}
  including checked exceptions.
  
  If the {@link CloseFunction} throws a checked exception not declared by any other call use {@link #expected()}
  to tell the compiler to expect it.