forked from External/mage
Some changes to logging and exception handling.
This commit is contained in:
parent
8c6893a8e8
commit
7992e654ff
4 changed files with 54 additions and 38 deletions
|
|
@ -116,9 +116,14 @@ public class GamesRoomImpl extends RoomImpl implements GamesRoom, Serializable {
|
|||
matchView = matchList;
|
||||
List<UsersView> users = new ArrayList<>();
|
||||
for (User user : UserManager.getInstance().getUsers()) {
|
||||
StringBuilder sb = new StringBuilder(user.getGameInfo());
|
||||
users.add(new UsersView(user.getName(), user.getInfo(), sb.toString()));
|
||||
try {
|
||||
users.add(new UsersView(user.getName(), user.getInfo(), user.getGameInfo()));
|
||||
} catch (Exception ex) {
|
||||
logger.fatal("User update exception: " + user.getName() + " - " + ex.toString(), ex);
|
||||
users.add(new UsersView(user.getName(), user.getInfo(), "[exception]"));
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(users, new UserNameSorter());
|
||||
usersView = users;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue