Show empty page tip if getting empty html string
This commit is contained in:
1 parent
3554fe1188
commit
efe7d4757a
5 files changed
+8
-2
No files matched your search
@@ -102,8 +102,10 @@ public class EhEngine {
|
||||
}
|
||||
|
||||
if (e instanceof ParseException) {
|
||||
if (body != null && !body.contains("<")){
|
||||
if (body != null && !body.contains("<")) {
|
||||
throw new EhException(body);
|
||||
} else if (TextUtils.isEmpty(body)) {
|
||||
throw new EhException(GetText.getString(R.string.error_empty_html));
|
||||
} else {
|
||||
if (Settings.getSaveParseErrorBody()) {
|
||||
AppConfig.saveParseErrorBody((ParseException) e);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 Hippo Seven
|
||||
~ Copyright 2016 Hippo Sevenerror_please_login_first
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
@@ -91,6 +91,7 @@
|
||||
<string name="error_cant_save_image">无法保存图片</string>
|
||||
<string name="error_invalid_number">非法数字</string>
|
||||
<string name="error_please_login_first">请先登陆</string>
|
||||
<string name="error_empty_html">页面内容为空</string>
|
||||
|
||||
<string name="app_waring">本应用中内容来自互联网,部分内容可能对您的生理及心理造成难以恢复的伤害。本应用作者不会对由本应用造成的任何后果负责。\n\n未成年人应在监护人指导下使用本应用。</string>
|
||||
<string name="error_username_cannot_empty">用户名不可为空</string>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<string name="error_cant_save_image">無法保存圖片</string>
|
||||
<string name="error_invalid_number">非法數字</string>
|
||||
<string name="error_please_login_first">請先登陸</string>
|
||||
<string name="error_empty_html">頁面內容為空</string>
|
||||
|
||||
<string name="app_waring">本應用中內容來自互聯網,部分內容可能對您的生理及心理造成難以恢復的傷害。本應用作者不會對由本應用造成的任何後果負責。\n\n未成年人應在監護人指導下使用本應用。</string>
|
||||
<string name="error_username_cannot_empty">用户名不可為空</string>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<string name="error_cant_save_image">無法儲存圖片</string>
|
||||
<string name="error_invalid_number">無效的數字</string>
|
||||
<string name="error_please_login_first">請先登陸</string>
|
||||
<string name="error_empty_html">頁面內容為空</string>
|
||||
|
||||
<string name="app_waring">本應用程式中內容來自網際網路,部分內容可能對您的生理及心理造成難以恢復的傷害。本應用程式的作者不會對由其所造成的任何影響負責。\n\n未成年人應在監護人指導下使用本應用程式。</string>
|
||||
<string name="error_username_cannot_empty">使用者名稱欄位不能為空</string>
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<string name="error_cant_save_image">Can\'t save image</string>
|
||||
<string name="error_invalid_number">Invalid number</string>
|
||||
<string name="error_please_login_first">Please login first</string>
|
||||
<string name="error_empty_html">Empty page</string>
|
||||
|
||||
<string name="app_waring">The content of this application is from the Internet. Some of it may do physical or mental harm to you. You have learnt the risks above and would like to undertake them.</string>
|
||||
<string name="error_username_cannot_empty">Username cannot be an empty string</string>
|
||||
|
||||
Reference in new issue
Block a user