Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Distinguish response parsing failures from unexpected exceptions.

luccioman11a7f923d49d
diff --git a/source/net/yacy/crawler/retrieval/Response.java b/source/net/yacy/crawler/retrieval/Response.java
index fe6b7f244..e8ed3a32c 100644
--- a/source/net/yacy/crawler/retrieval/Response.java
+++ b/source/net/yacy/crawler/retrieval/Response.java
@@ -862,6 +862,8 @@ public class Response {
if (supportError != null) throw new Parser.Failure("no parser support:" + supportError, url());
try {
return TextParser.parseSource(url(), this.responseHeader == null ? null : this.responseHeader.getContentType(), this.responseHeader == null ? StandardCharsets.UTF_8.name() : this.responseHeader.getCharacterEncoding(), new VocabularyScraper(), this.request.timezoneOffset(), this.request.depth(), this.content);
+ } catch(Parser.Failure e) {
+ throw e;
} catch (final Exception e) {
return null;
}