Handle when CommandException.getMessage() is null in CommandManager.

Related to WORLDEDIT-3156.
This commit is contained in:
sk89q 2014-07-09 23:05:40 -07:00
parent d74237b15e
commit 393b0d3d7a

View File

@ -243,7 +243,13 @@ public final class CommandManager {
actor.printRaw(t.getClass().getName() + ": " + t.getMessage());
t.printStackTrace();
} catch (CommandException e) {
String message = e.getMessage();
if (message != null) {
actor.printError(e.getMessage());
} else
actor.printError("An unknown error has occurred! Please see console.");
logger.log(Level.SEVERE, "An unknown error occurred", e);
}
} finally {
EditSession editSession = locals.get(EditSession.class);