mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 20:51:47 +01:00
Always show command exception stack traces in logs (#10766)
This commit is contained in:
parent
0c9dd451de
commit
c7e42591dd
@ -2076,7 +2076,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ if (throwCommandError) throw exception;
|
+ if (throwCommandError) throw exception;
|
||||||
MutableComponent ichatmutablecomponent = Component.literal(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
MutableComponent ichatmutablecomponent = Component.literal(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||||
|
|
||||||
|
+ Commands.LOGGER.error("Command exception: /{}", s, exception); // Paper - always show execution exception in console log
|
||||||
if (commandlistenerwrapper.getServer().isDebugging() || Commands.LOGGER.isDebugEnabled()) { // Paper - Debugging
|
if (commandlistenerwrapper.getServer().isDebugging() || Commands.LOGGER.isDebugEnabled()) { // Paper - Debugging
|
||||||
|
- Commands.LOGGER.error("Command exception: /{}", s, exception);
|
||||||
|
StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||||
|
|
||||||
|
for (int i = 0; i < Math.min(astacktraceelement.length, 3); ++i) {
|
||||||
@@ -0,0 +0,0 @@ public class Commands {
|
@@ -0,0 +0,0 @@ public class Commands {
|
||||||
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||||
RootCommandNode vanillaRoot = new RootCommandNode();
|
RootCommandNode vanillaRoot = new RootCommandNode();
|
||||||
|
Loading…
Reference in New Issue
Block a user