Skip to content

Commit 9df0725

Browse files
committed
Improve ResponseErroListener
1 parent 457405f commit 9df0725

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jdk: oraclejdk8
44
env:
55
global:
66
- ANDROID_API_LEVEL=25
7-
- ANDROID_BUILD_TOOLS_VERSION=25.0.2
7+
- ANDROID_BUILD_TOOLS_VERSION=25.0.3
88

99
android:
1010
components:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RxErrorHandler
2-
[ ![Bintray](https://img.shields.io/badge/bintray-v2.0.1-brightgreen.svg) ](https://bintray.com/jessyancoding/maven/rxerrorhandler/2.0.1/link)
2+
[ ![Bintray](https://img.shields.io/badge/bintray-v2.0.2-brightgreen.svg) ](https://bintray.com/jessyancoding/maven/rxerrorhandler/2.0.2/link)
33
[ ![Build Status](https://travis-ci.org/JessYanCoding/RxErrorHandler.svg?branch=master) ](https://travis-ci.org/JessYanCoding/RxErrorHandler)
44
[ ![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat-square) ](https://developer.android.com/about/versions/android-4.0.3.html)
55
[ ![License](http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square) ](http://www.apache.org/licenses/LICENSE-2.0)
@@ -10,7 +10,7 @@
1010

1111
```
1212
dependencies {
13-
compile 'me.jessyan:rxerrorhandler:2.0.1' //rxjava2
13+
compile 'me.jessyan:rxerrorhandler:2.0.2' //rxjava2
1414
}
1515
1616
dependencies {

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
5+
buildToolsVersion "25.0.3"
66

77
defaultConfig {
88
applicationId "me.jessyan.rxerrorhandler.demo"
99
minSdkVersion 15
1010
targetSdkVersion 25
11-
versionCode 2
12-
versionName "2.0.1"
11+
versionCode 3
12+
versionName "2.0.2"
1313
}
1414
buildTypes {
1515
release {
@@ -26,6 +26,6 @@ dependencies {
2626
compile fileTree(include: ['*.jar'], dir: 'libs')
2727
testCompile 'junit:junit:4.12'
2828
compile 'com.android.support:appcompat-v7:25.3.1'
29-
// compile 'me.jessyan:rxerrorhandler:2.0.1'
29+
// compile 'me.jessyan:rxerrorhandler:2.0.2'
3030
compile project(':rxerrorhandler')
3131
}

app/src/main/java/me/jessyan/rxerrorhandler/demo/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected void onCreate(Bundle savedInstanceState) {
2525
.with(this)
2626
.responseErroListener(new ResponseErroListener() {
2727
@Override
28-
public void handleResponseError(Context context, Exception e) {
28+
public void handleResponseError(Context context, Throwable t) {
2929
Log.w(TAG, "error handle");
3030
}
3131
}).build();

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.1'
8+
classpath 'com.android.tools.build:gradle:2.3.2'
99
classpath 'com.novoda:bintray-release:+'
1010
}
1111
}

rxerrorhandler/bintray.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish {
1919
userOrg = 'jessyancoding' //bintray注册的用户名
2020
groupId = 'me.jessyan' //compile引用时的第1部分groupId
2121
artifactId = 'rxerrorhandler' //compile引用时的第2部分项目名
22-
publishVersion = '2.0.1' //compile引用时的第3部分版本号
22+
publishVersion = '2.0.2' //compile引用时的第3部分版本号
2323
desc = 'Error Handle Of Rxjava'
2424
website = siteUrl
2525
}

rxerrorhandler/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
5+
buildToolsVersion "25.0.3"
66

77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 25
10-
versionCode 2
11-
versionName "2.0.1"
10+
versionCode 3
11+
versionName "2.0.2"
1212
}
1313
buildTypes {
1414
release {

rxerrorhandler/src/main/java/me/jessyan/rxerrorhandler/handler/ErrorHandlerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public ErrorHandlerFactory(Context mContext, ResponseErroListener mResponseErroL
2323
* @param throwable
2424
*/
2525
public void handleError(Throwable throwable) {
26-
mResponseErroListener.handleResponseError(mContext, (Exception) throwable);
26+
mResponseErroListener.handleResponseError(mContext, throwable);
2727
}
2828
}

rxerrorhandler/src/main/java/me/jessyan/rxerrorhandler/handler/listener/ResponseErroListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* Contact with jess.yan.effort@gmail.com
88
*/
99
public interface ResponseErroListener {
10-
void handleResponseError(Context context,Exception e);
10+
void handleResponseError(Context context, Throwable t);
1111

1212
ResponseErroListener EMPTY = new ResponseErroListener() {
1313
@Override
14-
public void handleResponseError(Context context, Exception e) {
14+
public void handleResponseError(Context context, Throwable t) {
1515

1616

1717
}

0 commit comments

Comments
 (0)