You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the only existing exception type is CommandSyntaxException, wich is also used by Command.run(CommandContext<S>).
However, in most (if not all) cases exceptions thrown by run are unrelated to the syntax of the command, they are rather related to the state of the application (e.g. the state of the Minecraft world). Therefore it might be good to add a new separate exception type, such as CommandExecutionException and add it as thrown exception type to run.
Assuming that this would be a checked exception type, such a change might cause backward incompatibilities in some situations.
Additionally the following changes could be done:
Remove CommandSyntaxException from the throws clause of run
Remove CommandSyntaxException constructor without input and cursor parameter; 'real' syntax exceptions should have enough context to specify input and cursor values
This would require larger refactoring for dependent projects because they are currently throwing CommandSyntaxException inside run, and maybe there are edge cases where throwing CommandSyntaxException from run is reasonable.
The text was updated successfully, but these errors were encountered:
Currently the only existing exception type is
CommandSyntaxException
, wich is also used byCommand.run(CommandContext<S>)
.However, in most (if not all) cases exceptions thrown by
run
are unrelated to the syntax of the command, they are rather related to the state of the application (e.g. the state of the Minecraft world). Therefore it might be good to add a new separate exception type, such asCommandExecutionException
and add it as thrown exception type torun
.Assuming that this would be a checked exception type, such a change might cause backward incompatibilities in some situations.
Additionally the following changes could be done:
CommandSyntaxException
from the throws clause ofrun
CommandSyntaxException
constructor withoutinput
andcursor
parameter; 'real' syntax exceptions should have enough context to specifyinput
andcursor
valuesThis would require larger refactoring for dependent projects because they are currently throwing
CommandSyntaxException
insiderun
, and maybe there are edge cases where throwingCommandSyntaxException
fromrun
is reasonable.The text was updated successfully, but these errors were encountered: