Improved logging for claim load failures.

Now includes identifying information to help server owner fix the
problem.
This commit is contained in:
ryanhamshire 2015-12-15 13:43:38 -08:00
parent 41401abfaf
commit 285d5c655a
2 changed files with 4 additions and 3 deletions

View File

@ -232,6 +232,7 @@ public class DatabaseDataStore extends DataStore
ArrayList<Claim> subdivisionsToLoad = new ArrayList<Claim>();
List<World> validWorlds = Bukkit.getServer().getWorlds();
Long claimID = null;
while(results.next())
{
try
@ -240,7 +241,7 @@ public class DatabaseDataStore extends DataStore
boolean removeClaim = false;
long parentId = results.getLong("parentid");
long claimID = results.getLong("id");
claimID = results.getLong("id");
Location lesserBoundaryCorner = null;
Location greaterBoundaryCorner = null;
@ -257,7 +258,7 @@ public class DatabaseDataStore extends DataStore
{
if(e.getMessage().contains("World not found"))
{
GriefPrevention.AddLogEntry("Failed to load a claim because its world isn't loaded (yet?). Please delete the claim or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString);
GriefPrevention.AddLogEntry("Failed to load a claim (ID:" + claimID.toString() + ") because its world isn't loaded (yet?). Please delete the claim or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString);
continue;
}
else

View File

@ -361,7 +361,7 @@ public class FlatFileDataStore extends DataStore
{
if(e.getMessage().contains("World not found"))
{
GriefPrevention.AddLogEntry("Failed to load a claim because its world isn't loaded (yet?). Please delete the claim or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString);
GriefPrevention.AddLogEntry("Failed to load a claim " + files[i].getName() + " because its world isn't loaded (yet?). Please delete the claim file or contact the GriefPrevention developer with information about which plugin(s) you're using to load or create worlds. " + lesserCornerString);
inStream.close();
}