If a command has an unhandled exception, the exception's message is simply dumped into chat (e.g. java.util.NoSuchElementException
) without any context, and no stacktrace is printed in the server console. In prior versions, it would output An unknown error occurred while attempting to perform this command (commands.generic.exception
).
This is problematic for 2 reasons:
It's not clear to the user what went wrong - just that an exception of some sort was thrown (this is fine if the exception has a user-friendly message, but in these cases it doesn't since they're unexpected)
-The lack of a stacktrace means that it's basically impossible to debug. No stacktrace on command-specific syntax exceptions is fine, but for other unexpected exceptions it's not (e.g. a
NullPointerException
- not knowing the line it occurred on makes it pretty much useless)-
Reproduction is hard - but right now this can be reproduced through MC-121661 (running /help asdfasdfasdf
), or through MC-106551 (how I first encountered it – not recommended for general testing though)
As of 17w45b, a stacktrace is now printed at level ERROR. However, this also isn't ideal, since this happens for brigadier exceptions too (which have the stacktrace disabled, but it implies something went wrong at a deeper level).
Linked issues
discovered while testing
relates to
Comments

This issue blocks MC-110532.
also take a look at MC-121913 related to logging and clogging up the log folder with tons of error messages. filling up the disk.