From 1bcc1450cb5d0454a730400217ab10f00fe5cadd Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 23 Apr 2009 21:18:01 +0000 Subject: [PATCH] more explaining error message in case of IOExceptions during html parsing git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5864 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaParser.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.java index 8e0d74444..353b70a06 100644 --- a/source/de/anomic/plasma/plasmaParser.java +++ b/source/de/anomic/plasma/plasmaParser.java @@ -671,6 +671,13 @@ public final class plasmaParser { final String errorMsg = "unsupported charset encoding: " + e.getMessage(); theLogger.logSevere("Unable to parse '" + location + "'. " + errorMsg, e); throw new ParserException(errorMsg,location, errorMsg); + } catch (final IOException e) { + // IOExceptions may occur during html parsing when a server closes the connection during reading. + // This may happen here, because the html parser is a streaming parser + // that produces surrogates while the connection is active + final String errorMsg = "IOException - server may have closed the connection. " + e.getMessage(); + theLogger.logWarning("Unable to parse '" + location + "'. " + errorMsg); + throw new ParserException(errorMsg, location, errorMsg); } catch (final Exception e) { // Interrupted- and Parser-Exceptions should pass through if (e instanceof InterruptedException) throw (InterruptedException) e;