@Override
    public void onError(Throwable e) {
      long p = produced;
      if (p != 0L) {
        arbiter.produced(p);
      }

      Observable<T> o;

      try {
        o = onError.call(e);
      } catch (Throwable ex) {
        Exceptions.throwIfFatal(ex);

        actual.onError(new CompositeException(e, ex));

        return;
      }

      if (o == null) {
        actual.onError(
            new NullPointerException("The onError function returned a null Observable."));
      } else {
        o.unsafeSubscribe(new ResumeSubscriber<T>(actual, arbiter));
      }
    }
 @Override
 public void onNext(T t) {
   produced++;
   actual.onNext(t);
 }
 @Override
 public void onError(Throwable e) {
   actual.onError(e);
 }
 @Override
 public void onNext(T t) {
   actual.onNext(t);
 }
 @Override
 public void onCompleted() {
   actual.onCompleted();
 }