*) Suppress stacktrace on crawler error for "MalformedURLException"

See: http://www.yacy-forum.de/viewtopic.php?p=8733#8733

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@613 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent a88e6d3ba2
commit f19c09b227

@ -44,6 +44,7 @@ package de.anomic.plasma;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException;
import java.net.SocketException; import java.net.SocketException;
import java.net.URL; import java.net.URL;
import java.net.UnknownHostException; import java.net.UnknownHostException;
@ -430,7 +431,9 @@ public final class plasmaCrawlWorker extends Thread {
boolean retryCrawling = false; boolean retryCrawling = false;
String errorMsg = e.getMessage(); String errorMsg = e.getMessage();
if (errorMsg != null) { if (errorMsg != null) {
if ((e instanceof UnknownHostException) || (errorMsg.indexOf("unknown host") >= 0)) { if (e instanceof MalformedURLException) {
log.logWarning("CRAWLER Malformed URL '" + url.toString() + "' detected. ");
} else if ((e instanceof UnknownHostException) || (errorMsg.indexOf("unknown host") >= 0)) {
log.logWarning("CRAWLER Unknown host in URL '" + url.toString() + "'. " + log.logWarning("CRAWLER Unknown host in URL '" + url.toString() + "'. " +
"Referer URL: " + ((referer == null) ?"Unknown":referer)); "Referer URL: " + ((referer == null) ?"Unknown":referer));
} else if (e instanceof java.net.BindException) { } else if (e instanceof java.net.BindException) {

Loading…
Cancel
Save