From 11a7f923d49dfc2a964d96db90b308067a579255 Mon Sep 17 00:00:00 2001 From: luccioman Date: Sun, 16 Jul 2017 14:39:53 +0200 Subject: [PATCH] Distinguish response parsing failures from unexpected exceptions. --- source/net/yacy/crawler/retrieval/Response.java | 2 ++ 1 file changed, 2 insertions(+) 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; }