GitPedia

RxErrorHandler

🗑 Error Handle Of Rxjava

From JessYanCoding·Updated March 25, 2026·View on GitHub·

[ ](https://bintray.com/jessyancoding/maven/rxerrorhandler/2.1.1/link) [ ](https://travis-ci.org/JessYanCoding/RxErrorHandler) [ ](https://developer.android.com/about/versions/android-2.3.html) [ ](http://www.apache.org/licenses/LICENSE-2.0) [ ](https://www.jianshu.com/u/1d0c0bc634db) [ ](https://shang.qq.com/wpa/qunwpa?idkey=7e59e59145e6c7c68932ace10f52790636451f01d1ecadb6a652b1df234df753) The project is written primarily in Java, distributed under the Apache License 2.0 license, first published in 2016. Key topics include: arms, mvparms, rxjava, rxjava-library.

Latest release: v2.1.12.1.1
February 28, 2018View Changelog →

RxErrorHandler

Jcenter
Build Status
API
License
Author
QQ-Group

Error Handle Of Rxjava

Download

gradle
implementation 'me.jessyan:rxerrorhandler:2.1.1' //rxjava2 implementation 'me.jessyan:rxerrorhandler:1.0.1' //rxjava1

Initialization

java
RxErrorHandler rxErrorHandler = RxErrorHandler .builder() .with(this) .responseErrorListener(new ResponseErrorListener() { @Override                    public void handleResponseError(Context context, Throwable t) { if (t instanceof UnknownHostException) { //do something ... } else if (t instanceof SocketTimeoutException) { //do something ... } else { //handle other Exception ... } Log.w(TAG, "Error handle"); } }).build();

Usage

java
Observable .error(new Exception("Error")) .retryWhen(new RetryWithDelay(3, 2))//retry(http connect timeout) .subscribe(new ErrorHandleSubscriber<Object>(rxErrorHandler) { @Override public void onNext(Object o) { } }); //Backpressure Flowable .error(new Exception("Error")) .retryWhen(new RetryWithDelayOfFlowable(3, 2))//retry(http connect timeout) .subscribe(new ErrorHandleSubscriberOfFlowable<Object>(rxErrorHandler) { @Override public void onNext(Object o) { } });

About Me

License

 Copyright 2016, jessyan               
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at   

       http://www.apache.org/licenses/LICENSE-2.0  

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. 

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from JessYanCoding/RxErrorHandler via the GitHub API.Last fetched: 6/23/2026