Catch error if retryWhen:s retries runs out : <p>In the <a href="http://reactivex.io/documentation/operators/retry.html" rel="noreferrer">documentation for RetryWhen</a> the example there goes like this: </p>

<pre><code>Observable.create((Subscriber&lt;? super String&gt; s) -&gt; {
  System.out.println("subscribing");
  s.onError(new RuntimeException("always fails"));
}).retryWhen(attempts -&gt; {
  return attempts.zipWith(Observable.range(1, 3), (n, i) -&gt; i).flatMap(i -&gt; {
      System.out.println("delay retry by " + i + " second(s)");
      return Observable.timer(i, TimeUnit.SECONDS);
  });
}).toBlocking().forEach(System.out::println);
</code></pre>

<p>But how do I propagate the Error if the retries runs out?</p>

<p>Adding <code>.doOnError(System.out::println)</code> <em>after</em> the <code>retryWhen</code> clause does not catch the error. Is it even emitted? </p>

<p>Adding a <code>.doOnError(System.out::println)</code> <em>before</em> retryWhen displays <code>always fails</code> for all retries. </p>
