Skip to content

Commit

Permalink
2019年06月10日17:54:25
Browse files Browse the repository at this point in the history
  • Loading branch information
代发琳 committed Jun 10, 2019
1 parent 9e4d40a commit 5476489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rxeasyhttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

group = 'com.github.DaiFalin'
version = '2.1.6'
version = '2.1.7'

android {
compileSdkVersion 28
Expand All @@ -18,7 +18,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "2.1.6"
versionName "2.1.7"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.gson.JsonSerializer;
import com.google.gson.JsonSyntaxException;
import com.zhouyou.http.model.ApiResult;
import com.zhouyou.http.utils.HttpLog;

import org.apache.http.conn.ConnectTimeoutException;
import org.json.JSONException;
Expand Down Expand Up @@ -92,6 +93,8 @@ public static boolean isOk(ApiResult apiResult) {

public static ApiException handleException(Throwable e) {
ApiException ex;
e.printStackTrace();
HttpLog.e("ApiException", e);
if (e instanceof HttpException) {
HttpException httpException = (HttpException) e;
ex = new ApiException(httpException, String.valueOf(httpException.code()));
Expand Down Expand Up @@ -147,7 +150,7 @@ public static ApiException handleException(Throwable e) {
return ex;
} else if (e instanceof UnknownHostException) {
ex = new ApiException(e, ERROR.UNKNOWNHOST_ERROR);
ex.message = "无法解析该域名";
ex.message = "网络连接错误,请检查网络连接";
return ex;
} else if (e instanceof NullPointerException) {
ex = new ApiException(e, ERROR.NULLPOINTER_EXCEPTION);
Expand Down

0 comments on commit 5476489

Please sign in to comment.