From: David ‘Bombe’ Roden Date: Tue, 5 Apr 2011 09:22:40 +0000 (+0200) Subject: Add large try-catch block around SoneInserter’s run() method. X-Git-Tag: 0.6.1^2~35 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bb272e31ec32fb5f7d09ff08180ffafd41e91796;p=Sone.git Add large try-catch block around SoneInserter’s run() method. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java index 05fa4b4..15e054f 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java @@ -160,7 +160,7 @@ public class SoneInserter extends AbstractService { protected void serviceRun() { long lastModificationTime = 0; String lastFingerprint = ""; - while (!shouldStop()) { + while (!shouldStop()) { try { /* check every seconds. */ sleep(1000); @@ -236,7 +236,9 @@ public class SoneInserter extends AbstractService { } } } - } + } catch (Throwable t1) { + logger.log(Level.SEVERE, "SoneInserter threw an Exception!", t1); + }} } /**