Class CommandExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
cloud.commandframework.exceptions.CommandExecutionException
- All Implemented Interfaces:
Serializable
@API(status=STABLE,
since="1.2.0")
public class CommandExecutionException
extends IllegalArgumentException
Exception thrown when there is an exception during execution of a command handler
- Since:
- 1.2.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandExecutionException
(@NonNull Throwable cause) Exception thrown when there is an exception during execution of a command handlerCommandExecutionException
(@NonNull Throwable cause, @Nullable CommandContext<?> commandContext) Exception thrown when there is an exception during execution of a command handler -
Method Summary
Modifier and TypeMethodDescription@Nullable CommandContext<?>
Get the CommandContext which led to this exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandExecutionException
@API(status=INTERNAL, consumers="cloud.commandframework.*") public CommandExecutionException(@NonNull Throwable cause) Exception thrown when there is an exception during execution of a command handler- Parameters:
cause
- Exception thrown during the execution of a command handler
-
CommandExecutionException
@API(status=INTERNAL, consumers="cloud.commandframework.*", since="1.4.0") public CommandExecutionException(@NonNull Throwable cause, @Nullable CommandContext<?> commandContext) Exception thrown when there is an exception during execution of a command handler- Parameters:
cause
- Exception thrown during the execution of a command handlercommandContext
- Command context- Since:
- 1.4.0
-
-
Method Details
-
getCommandContext
Get the CommandContext which led to this exception- Returns:
- Command
- Since:
- 1.4.0
-