static <A, E extends Exception> Throwable invokeAll0(
		final ThrowingConsumer<? super A, ? extends E> method,
		final Iterable<? extends A> objects
	) {
		int suppressedCount = 0;
		Throwable error = null;
		for (var object : objects) {
			if (error != null) {
				try {
					method.accept(object);
				} catch (Exception suppressed) {
					if (suppressedCount++ < MAX_SUPPRESSED) {
						error.addSuppressed(suppressed);
					}
				}
			} else {
				try {
					method.accept(object);
				} catch (VirtualMachineError|LinkageError e) {
					throw e;
				} catch (Throwable e) {
					error = e;
				}
			}
		}

		return error;
	}
Invokes the {@code method} on all given {@code objects}, no matter if one
of the method invocations throws an exception. The first exception thrown
is returned, all other exceptions are swallowed.

@param objects the objects where the methods are called.
@param method the method which is called on the given object.
@return the first exception thrown by the method invocation or {@code null}
        if no exception has been thrown
jenetics/src/main/java/io/jenetics/internal/util/Lifecycle.java