From db0081e92e254c050951cbc5014d119a2f3cd607 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Thu, 13 Nov 2014 19:45:40 -0800 Subject: [PATCH] Better logging for failures to read claim data. --- src/me/ryanhamshire/GriefPrevention/DataStore.java | 4 ++-- src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/DataStore.java b/src/me/ryanhamshire/GriefPrevention/DataStore.java index 01bbd02..815f3ce 100644 --- a/src/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DataStore.java @@ -389,9 +389,9 @@ public abstract class DataStore String [] elements = string.split(locationStringDelimiter); //expect four elements - world name, X, Y, and Z, respectively - if(elements.length != 4) + if(elements.length < 4) { - throw new Exception("Expected four distinct parts to the location string."); + throw new Exception("Expected four distinct parts to the location string: \"" + string + "\""); } String worldName = elements[0]; diff --git a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java index 4c29e1d..fdd0a59 100644 --- a/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java @@ -329,6 +329,7 @@ public class FlatFileDataStore extends DataStore else { GriefPrevention.AddLogEntry("Unable to load data for claim \"" + files[i].getName() + "\": " + e.toString()); + e.printStackTrace(); } }