From 9fdb7beb46e88cff411ab19265812125c9255680 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 18 Jan 2022 13:08:15 +0100 Subject: [PATCH] Fixed unmanaged crawl exception. --- src/fr/devinsy/statoolinfos/crawl/Crawler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fr/devinsy/statoolinfos/crawl/Crawler.java b/src/fr/devinsy/statoolinfos/crawl/Crawler.java index 6ee7e05..9fe667f 100644 --- a/src/fr/devinsy/statoolinfos/crawl/Crawler.java +++ b/src/fr/devinsy/statoolinfos/crawl/Crawler.java @@ -119,6 +119,13 @@ public class Crawler 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());