alternative IteratorPublisher

(1 to 3).iterator.map( x => if (x == 2) throw new IllegalStateException("not two") else x )