[BugFix]修复1.5.0的bug

This commit is contained in:
wushaocheng
2023-01-30 16:22:14 +08:00
parent 8fa408aa3d
commit aab6b7cc28
8 changed files with 23 additions and 18 deletions

View File

@@ -29,13 +29,14 @@ public class OldHttpErrorHandleUtil {
return ResUtil.getString(R.string.xchat_android_core_utils_oldhttperrorhandleutil_01);
}
return result.getMessage();
} else if (throwable.getMessage().contains("SocketTimeoutException") || throwable.getMessage().contains("ConnectException") || throwable.getMessage().contains("UnknownHostException")) {
return ResUtil.getString(R.string.xchat_android_core_utils_oldhttperrorhandleutil_02);
} else if (throwable.getMessage().contains("JsonParseException") || throwable.getMessage().contains("JSONException") || throwable.getMessage().contains("ParseException") ) {
return ResUtil.getString(R.string.data_parsing_exception);
} else if (throwable.getMessage().contains("IllegalArgumentException")) {
return ResUtil.getString(R.string.parameter_error);
} else {
if (throwable.getMessage() != null &&
(throwable.getMessage().contains("ConnectException") || throwable.getMessage().contains("UnknownHostException"))) {
return ResUtil.getString(R.string.xchat_android_core_utils_oldhttperrorhandleutil_02);
} else {
return throwable.getMessage();
}
return throwable.getMessage();
}
} catch (Exception e) {
return e.getMessage();

View File

@@ -664,4 +664,6 @@
<string name="not_install_app">未安裝該應用</string>
<string name="wechat_share_title">HABU-Making new friends,join HABU right now. </string>
<string name="wechat_share_content">Find and join the best groups,talk with strangers</string>
<string name="data_parsing_exception">數據解析異常</string>
<string name="parameter_error">參數錯誤</string>
</resources>