Skip to content

Conversation

@intsuc
Copy link

@intsuc intsuc commented Feb 3, 2023

This PR avoids stringifying exception messages eagerly to reduce the overhead on command failure.

@intsuc intsuc marked this pull request as ready for review February 3, 2023 09:34

public CommandSyntaxException(final CommandExceptionType type, final Message message) {
super(message.getString(), null, ENABLE_COMMAND_STACK_TRACES, ENABLE_COMMAND_STACK_TRACES);
super(null, null, ENABLE_COMMAND_STACK_TRACES, ENABLE_COMMAND_STACK_TRACES);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the 2nd null, could you delete it because its a duplicate? Same for line 27?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second null should not be a duplicate. Since Exception does not have such a constructor, if you delete the second null, it will result in an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants