default <X extends Throwable> Seq<T> onEmptyThrow(Supplier<? extends X> supplier) {
        boolean[] first = { true };

        return SeqUtils.transform(this, (delegate, action) -> {
            if (first[0]) {
                first[0] = false;

                if (!delegate.tryAdvance(action))
                    sneakyThrow(supplier.get());

                return true;
            } else {
                return delegate.tryAdvance(action);
            }
        });
    }
Produce this stream, or throw a throwable from the
<code>supplier</code>, in case this stream is empty.
jOOL/src/main/java/org/jooq/lambda/Seq.java