package i0.e0.a; import i0.x; import j0.o.o; import java.util.Objects; import rx.Observable; import rx.Subscriber; import rx.exceptions.CompositeException; import rx.exceptions.OnCompletedFailedException; import rx.exceptions.OnErrorFailedException; import rx.exceptions.OnErrorNotImplementedException; /* compiled from: ResultOnSubscribe */ public final class e implements Observable.a> { public final Observable.a> i; /* compiled from: ResultOnSubscribe */ public static class a extends Subscriber> { public final Subscriber> i; public a(Subscriber> subscriber) { super(subscriber); this.i = subscriber; } @Override // j0.g public void onCompleted() { this.i.onCompleted(); } @Override // j0.g public void onError(Throwable th) { try { Subscriber> subscriber = this.i; Objects.requireNonNull(th, "error == null"); subscriber.onNext(new d(null, th)); this.i.onCompleted(); } catch (Throwable th2) { try { this.i.onError(th2); } catch (OnCompletedFailedException | OnErrorFailedException | OnErrorNotImplementedException unused) { Objects.requireNonNull(o.a.b()); } catch (Throwable th3) { c.q.a.k.a.Z(th3); new CompositeException(th2, th3); Objects.requireNonNull(o.a.b()); } } } @Override // j0.g public void onNext(Object obj) { x xVar = (x) obj; Subscriber> subscriber = this.i; Objects.requireNonNull(xVar, "response == null"); subscriber.onNext(new d(xVar, null)); } } public e(Observable.a> aVar) { this.i = aVar; } @Override // rx.functions.Action1 public void call(Object obj) { this.i.call(new a((Subscriber) obj)); } }