Better logging for failures to read claim data.

This commit is contained in:
ryanhamshire 2014-11-13 19:45:40 -08:00
parent 13a44d774d
commit db0081e92e
2 changed files with 3 additions and 2 deletions

View File

@ -389,9 +389,9 @@ public abstract class DataStore
String [] elements = string.split(locationStringDelimiter); String [] elements = string.split(locationStringDelimiter);
//expect four elements - world name, X, Y, and Z, respectively //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]; String worldName = elements[0];

View File

@ -329,6 +329,7 @@ public class FlatFileDataStore extends DataStore
else else
{ {
GriefPrevention.AddLogEntry("Unable to load data for claim \"" + files[i].getName() + "\": " + e.toString()); GriefPrevention.AddLogEntry("Unable to load data for claim \"" + files[i].getName() + "\": " + e.toString());
e.printStackTrace();
} }
} }