davidmoten / rxjava-extras

Utilities for use with rxjava
Apache License 2.0
269 stars 27 forks source link

Operator to continue after an onComplete or onError with another seq #14

Closed akarnokd closed 8 years ago

akarnokd commented 8 years ago

This adds an operator that allows continuing with another Observable when the main source completes or signals an error. This is aimed at replacing this pattern:

source.concatWith(onCompleteObservable).onErrorResumeNext(e -> onErrorObservable);

The problem with this is that if an error in onCompleteObservable triggers the onErrorResumeNext or if swapped, the completion of onErrorObservable triggers concatWith.

davidmoten commented 8 years ago

Thanks @akarnokd!