|
|
@ -30,7 +30,9 @@ import java.util.regex.Pattern; |
|
|
|
import io.reactivex.Observable; |
|
|
|
import io.reactivex.android.schedulers.AndroidSchedulers; |
|
|
|
import io.reactivex.disposables.CompositeDisposable; |
|
|
|
import io.reactivex.exceptions.UndeliverableException; |
|
|
|
import io.reactivex.observers.DisposableObserver; |
|
|
|
import io.reactivex.plugins.RxJavaPlugins; |
|
|
|
import io.reactivex.schedulers.Schedulers; |
|
|
|
import io.reactivex.subjects.BehaviorSubject; |
|
|
|
import retrofit2.HttpException; |
|
|
@ -63,6 +65,14 @@ public class LocalTopUpPresenter extends BasePresenter implements LocalTopUpPres |
|
|
|
this.fixedTopUpValidator = new FixedTopUpValidator(); |
|
|
|
this.dataTopUpValidator = new DataTopUpValidator(); |
|
|
|
|
|
|
|
RxJavaPlugins.setErrorHandler(throwable -> { |
|
|
|
if (throwable instanceof UndeliverableException && throwable.getCause() instanceof HttpException) { |
|
|
|
return; // ignore BleExceptions as they were surely delivered at least once |
|
|
|
} |
|
|
|
// add other custom handlers if needed |
|
|
|
throw new RuntimeException("Unexpected Throwable in RxJavaPlugins error handler", throwable); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|