title: Not entering error handling block during exception
body: <p>In the following method, I am purposely making the call c.rxCommit() throw an exception during test.
  The exception is thrown as expected, but I never land in the onErrorResumeNext block as expected.</p>
  <p>I am expecting to land inside here to handle the error and perform some rollback.
  Can I get some advice as to why I am not landing within the error block? Thanks.</p>
  <pre><code>public Observable&lt;Void&gt; myMethod(Observable&lt;Map&lt;String, String&gt;&gt; records) {
  
      return client.rxGetConnection()
              .flatMapCompletable(c -&gt; c.rxSetAutoCommit(false)
                      .toCompletable()
                      .andThen(records.flatMapSingle(record -&gt; perform(c, record)).toCompletable())
                      .andThen(c.rxCommit().toCompletable()) // test makes this c.rxCommit() throw an error on purpose. 
                      .onErrorResumeNext(throwable -&gt; {
                          // I want to land in here when error but it is not happening.
                          return c.rxRollback().toCompletable();
                      })
                      .andThen(c.rxSetAutoCommit(true).toCompletable())
                      .andThen(c.rxClose()).toCompletable()
              ).toObservable();
  }
  </code></pre>
  <p>The test</p>
  <pre><code>@Test
  void test() {
      when(sqlConnection.rxCommit()).thenThrow(new RuntimeException(&quot;Error on Commit&quot;)); // mockito
      myClass.myMethod(mockedRecords).subscribe(
              success -&gt; System.out.println(),
              throwable -&gt; System.out.println(&quot;err &quot; + throwable), // I land in here with the new RuntimeException(&quot;Error on Commit&quot;) exception. 
              // this is wrong. Error should have been handled in the onErrorResumeNext block and should be getting success here instead. 
      );
  
      // some verify() to test outcome
  }
  </code></pre>