From d824a19112faff3d694f100abc695d6805080e4a Mon Sep 17 00:00:00 2001 From: Anton Keks Date: Fri, 1 Feb 2013 18:18:18 +0200 Subject: [PATCH] catch Errors as well --- src/net/azib/ipscan/core/net/PingerRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/azib/ipscan/core/net/PingerRegistry.java b/src/net/azib/ipscan/core/net/PingerRegistry.java index 6ba91658..f82608ff 100755 --- a/src/net/azib/ipscan/core/net/PingerRegistry.java +++ b/src/net/azib/ipscan/core/net/PingerRegistry.java @@ -17,7 +17,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.logging.Logger; -import static java.util.logging.Level.*; +import static java.util.logging.Level.SEVERE; /** * PingerRegistry @@ -87,7 +87,7 @@ public class PingerRegistry { Pinger icmpPinger = createPinger(scannerConfig.selectedPinger, 250); icmpPinger.ping(new ScanningSubject(InetAddress.getLocalHost()), 1); } - catch (Exception e) { + catch (Throwable e) { LOG.info("ICMP pinger failed: " + e); // win32 will use native pinger, all others get combined UDP+TCP, which doesn't require special privileges scannerConfig.selectedPinger = Platform.WINDOWS && !Platform.ARCH_64 ? "pinger.windows" : "pinger.combined";