title: How to propagate exception from inner doOnError into outer doOnError?
body: <p>I have <code>pay</code> method in which i should call initiatePayment and <code>onSuccess</code> i should call <code>confirmPayment</code>.
  In case of any exception in any of the two calls, the it should emit an exception</p>
  
  <pre><code>public Single&lt;PayResponse&gt; pay(PayRequest apiRequest) {
  
              return client.initiatePayment(apiRequest)
                      .doOnSuccess(initiatePaymentResponse -&gt; {
                          client.confirmPayment(initiatePaymentResponse.getPaymentId())
                                  .doOnSuccess(confirmPaymentResponse -&gt; doConfirmationLogic(confirmPaymentResponse ))
                                  .doOnError(ex -&gt; {ex.printStackTrace();logError(ex);});
                      })
  
                      .doOnError(ex -&gt; {ex.printStackTrace();logError(ex);});
          }
  </code></pre>
  
  <p>In my cited code an error occurs in <code>confirmPayment</code> but <code>initiatePayment</code> continues normally.</p>
  
  <p>How can I propagate the exception from the inner <strong><code>doOnError</code></strong> to the outer <strong><code>doOnError</code></strong>?</p>