From d78df58eea285b13922d50e773bc1684f6a76cef Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sun, 4 Mar 2012 10:39:39 +0000 Subject: Better reporting when a users.yml is failing to load. --- .../src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index e766b6c78..a01381fcd 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -602,7 +602,12 @@ public class WorldDataHolder { // Load users if the file is NOT empty if (allUsersNode != null) for (String usersKey : allUsersNode.keySet()) { - Map thisUserNode = (Map) allUsersNode.get(usersKey); + Map thisUserNode = null; + try { + thisUserNode = (Map) allUsersNode.get(usersKey); + } catch (Exception ex) { + throw new IllegalArgumentException("Bad format found in file: " + usersFile.getPath()); + } User thisUser = ph.createUser(usersKey); if (thisUser == null) { throw new IllegalArgumentException("I think this user was declared more than once: " + usersKey + " in file: " + usersFile.getPath()); -- cgit v1.2.3