while (scanner.hasNext()) {
final String userCommandInput = scanner.nextLine().trim().toUpperCase();
try {
ChatCommand chatCommand = Enum.valueOf(ChatCommand.class, userCommandInput);
chatCommand.execute(this.console, this.controller, new ChatCommand.Listener() {
public void exception(Exception e) {
System.err.println("Error: (Command = " + userCommandInput + ")");
e.printStackTrace();
}
});