Imporved error message.

This commit is contained in:
Christian P. MOMON 2022-01-20 16:27:25 +01:00
parent eee023346f
commit 00d778c9f3

View file

@ -117,28 +117,24 @@ public class Crawler
logger.error("ERROR: crawl failed for [{}]: {}", url.toString(), exception.getMessage());
this.journal.add(url, parentURL, CrawlStatus.CONNECTERROR);
downloadFile = null;
exception.printStackTrace();
}
catch (java.net.SocketException exception)
{
logger.error("ERROR: crawl failed for [{}]: {}", url.toString(), exception.getMessage());
this.journal.add(url, parentURL, CrawlStatus.CONNECTERROR);
downloadFile = null;
exception.printStackTrace();
}
catch (FileNotFoundException exception)
{
logger.error("ERROR: crawl failed for [{}]: {}", url.toString(), exception.getMessage());
this.journal.add(url, parentURL, CrawlStatus.URLNOTFOUND);
downloadFile = null;
exception.printStackTrace();
}
catch (IOException exception)
{
logger.error("ERROR: crawl failed for [{}]: {}", url.toString(), exception.getMessage());
this.journal.add(url, parentURL, CrawlStatus.DOWNLOADERROR);
downloadFile = null;
exception.printStackTrace();
}
if (downloadFile != null)