code: protected static Consumer<Supplier<PrimitiveIterator.OfInt>> composeWithExceptions(Consumer<Supplier<PrimitiveIterator.OfInt>> a,
           Consumer<Supplier<PrimitiveIterator.OfInt>> b) {
        return (segments) -> {
           try {
              a.accept(segments);
           }
           catch (Throwable e1) {
              try {
                 b.accept(segments);
              }
              catch (Throwable e2) {
                 try {
                    e1.addSuppressed(e2);
                 } catch (Throwable ignore) {}
              }
              throw e1;
           }
           b.accept(segments);
        };
     }
docs: Given two SegmentCompletionListener, return a SegmentCompletionListener that
  executes both in sequence, even if the first throws an exception, and if both
  throw exceptions, add any exceptions thrown by the second as suppressed
  exceptions of the first.