hostName = new URL(url).getHost();
} catch (MalformedURLException cause) {
throw new ScannerException(
- String.format("Incorrect URL: %s", url), cause
+ "scanner.incorrect.url", cause, url
);
}
ScannerType type = ScannerType.byHost(hostName);
if (type == null) {
throw new ScannerException(
- String.format("Host %s is not among the known for the scanner", hostName)
+ "scanner.host.unknown", hostName
);
}
return scanner(type).scanUrl(url);