fixup! Tweak EhEngine transformException

This commit is contained in:
FooIbar authored and tarsin committed 2023-02-05 22:00:12 +08:00
1 parent 4d69bf2aba
commit 82ebfb99c5
1 file changed
+3 -3
@@ -103,10 +103,10 @@ object EhEngine {
throw StatusCodeException(code) throw StatusCodeException(code)
} }
if (e is ParseException) { if (e is ParseException) {
if (body != null && !body.contains("<")) { if (TextUtils.isEmpty(body)) {
throw EhException(body)
} else if (TextUtils.isEmpty(body)) {
throw EhException(GetText.getString(R.string.error_empty_html)) throw EhException(GetText.getString(R.string.error_empty_html))
} else if (body != null && !body.contains("<")) {
throw EhException(body)
} else { } else {
if (Settings.getSaveParseErrorBody()) { if (Settings.getSaveParseErrorBody()) {
AppConfig.saveParseErrorBody(e as ParseException?) AppConfig.saveParseErrorBody(e as ParseException?)