Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

Minor modif to TikaParser : dumps parse exceptions to log and not to System.err

Julien Nioche3008b630f914
diff --git a/src/plugin/parse-tika/src/java/org/apache/nutch/parse/tika/TikaParser.java b/src/plugin/parse-tika/src/java/org/apache/nutch/parse/tika/TikaParser.java
index ed57ee459..f38eeb5eb 100644
--- a/src/plugin/parse-tika/src/java/org/apache/nutch/parse/tika/TikaParser.java
+++ b/src/plugin/parse-tika/src/java/org/apache/nutch/parse/tika/TikaParser.java
@@ -94,7 +94,7 @@ public class TikaParser implements org.apache.nutch.parse.Parser {
try {
parser.parse(new ByteArrayInputStream(raw), domhandler, tikamd,context);
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error("Error parsing "+content.getUrl(),e);
return new ParseStatus(ParseStatus.FAILED, e.getMessage())
.getEmptyParseResult(content.getUrl(), getConf());
}