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

Related to WORLDEDIT-3156.
Dieser Commit ist enthalten in:
sk89q 2014-07-09 23:05:40 -07:00
Ursprung d74237b15e
Commit 393b0d3d7a

Datei anzeigen

@ -243,7 +243,13 @@ public final class CommandManager {
actor.printRaw(t.getClass().getName() + ": " + t.getMessage()); actor.printRaw(t.getClass().getName() + ": " + t.getMessage());
t.printStackTrace(); t.printStackTrace();
} catch (CommandException e) { } catch (CommandException e) {
actor.printError(e.getMessage()); 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 { } finally {
EditSession editSession = locals.get(EditSession.class); EditSession editSession = locals.get(EditSession.class);