better debugging in new URL class for wrong port numbers

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2315 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent cc2be7fb43
commit 79af283f6c

@ -70,7 +70,7 @@ public class URL {
path = url.substring(q);
}
identPort();
identPort(url);
identRef();
identQuest();
}
@ -112,7 +112,7 @@ public class URL {
identQuest();
}
private void identPort() throws MalformedURLException {
private void identPort(String inputURL) throws MalformedURLException {
// identify ref in file
int r = host.indexOf(':');
if (r < 0) {
@ -122,7 +122,7 @@ public class URL {
this.port = Integer.parseInt(host.substring(r + 1));
this.host = host.substring(0, r);
} catch (NumberFormatException e) {
throw new MalformedURLException("wrong port in " + this.host);
throw new MalformedURLException("wrong port in host fragment '" + this.host + "' of input url '" + inputURL + "'");
}
}
}

Loading…
Cancel
Save