Skip to content

Commit

Permalink
more explaining error message in case of IOExceptions during html par…
Browse files Browse the repository at this point in the history
…sing

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5864 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Apr 23, 2009
1 parent fe51f4d commit 1bcc145
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/de/anomic/plasma/plasmaParser.java
Expand Up @@ -671,6 +671,13 @@ public plasmaParserDocument parseSource(final yacyURL location, final String the
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;
Expand Down

0 comments on commit 1bcc145

Please sign in to comment.