Fixed player subcommand, removed debug outputs #41
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Redstoner/redstoner-utils#41
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "chatalias"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I don't think it's a good idea to remove debug output and catch exceptions, i.e. silently ignoring them. We either need the traces for debugging or – when we're confident there are no more bugs – the try/catch should also be gone. The latter will still print exceptions to the log and tell the command issuer that something went wrong.
Somewhat related, I don't think printing the command help when there's an exception is a good idea at all, it's just confusing.
The only two places where it is printing the help screen are lines 87 and 282, both of which are catching the case that the user is calling the command with a missing argument. If you want console to throw an error each time someone types /alias I'm fine with that but I rather would hide it. Adding a test for the length of the argument would resolve that issue yet if something goes wrong and goes to that catch it is directly related to the user not giving proper input and not the plugin or database doing something wrong. The only case where I think we actually would want it back is line 157 (definitly catch it though).
Line 126 the try/catch can just be removed, it's not nessecary anymore.