From 7503470cb16ee070f29b8cd13b184fc8519adb7f Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 18 Feb 2014 21:46:42 +0100 Subject: [PATCH] No need to throw an exception if the "last updated" file is corrupt. --- .../main/java/com/comphenix/protocol/ProtocolConfig.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java index 798957d8..76bf8ebc 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolConfig.java @@ -110,14 +110,13 @@ public class ProtocolConfig { try { return Long.parseLong(Files.toString(dataFile, Charsets.UTF_8)); } catch (NumberFormatException e) { - throw new RuntimeException("Cannot parse " + dataFile + " as a number.", e); + plugin.getLogger().warning("Cannot parse " + dataFile + " as a number."); } catch (IOException e) { - throw new RuntimeException("Cannot read " + dataFile, e); + plugin.getLogger().warning("Cannot read " + dataFile); } - } else { - // Default last update - return 0; } + // Default last update + return 0; } /**