title: RxJava: catch exception properly
body: <p>I am trying to perform some IO operation in the Schedulers IO thread, and if an exception is thrown, I want to show some Toast to the user.</p>
  
  <p>For this I use the following code:</p>
  
  <pre><code>Observable.interval(0, 15, TimeUnit.SECONDS)
              .observeOn(Schedulers.io())
              .doOnNext(event -&gt; new Repository().inputOutput(MainActivity.this);)
              .observeOn(AndroidSchedulers.mainThread())
              .doOnError(throwable -&gt; 
                      Toast.makeText(MainActivity.this, "Error message", Toast.LENGTH_SHORT).show())
              .subscribe();
  </code></pre>
  
  <p>When an exception is thrown on method "inputOutput", I expect the Throwable to be catched in the "doOnError" consumer, but it doesn't happen and the exception is thrown to the surrounding code.</p>
  
  <p>What am I doint wrong?
  Thank you very much!</p>