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
Exception thrown when there is an exception during execution of a command handler
- Since:
- 1.2.0
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionCommandExecutionException(@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
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
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
-