Improved logging for claim loading issues.

Specifically exceptions with NULL messages.
This commit is contained in:
ryanhamshire 2015-12-23 07:56:14 -08:00
parent e29d66735a
commit e8618c6a40
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ public class DatabaseDataStore extends DataStore
}
catch(Exception e)
{
if(e.getMessage().contains("World not found"))
if(e.getMessage() != null && e.getMessage().contains("World not found"))
{
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;

View File

@ -359,7 +359,7 @@ public class FlatFileDataStore extends DataStore
//if there's any problem with the file's content, log an error message and skip it
catch(Exception e)
{
if(e.getMessage().contains("World not found"))
if(e.getMessage() != null && e.getMessage().contains("World not found"))
{
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();