Class CommandException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.spongepowered.api.util.ComponentMessageException
org.spongepowered.api.command.exception.CommandException
- All Implemented Interfaces:
- Serializable,- ComponentMessageThrowable
- Direct Known Subclasses:
- ArgumentParseException,- CommandNotFoundException,- CommandPermissionException,- InvocationCommandException
Thrown when an executed command raises an error or when execution of
 the command failed.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCommandException(Component message) Constructs a newCommandExceptionwith the given message.CommandException(Component message, boolean includeUsage) Constructs a newCommandExceptionwith the given message.CommandException(Component message, Throwable cause) Constructs a newCommandExceptionwith the given message and the given cause.CommandException(Component message, Throwable cause, boolean includeUsage) Constructs a newCommandExceptionwith the given message and the given cause.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanGets whether the exception should include usage in the presentation of the exception/stack-trace.Methods inherited from class org.spongepowered.api.util.ComponentMessageExceptioncomponentMessage, getLocalizedMessage, getMessageMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
CommandExceptionConstructs a newCommandExceptionwith the given message.- Parameters:
- message- The detail message
 
- 
CommandExceptionConstructs a newCommandExceptionwith the given message and the given cause.- Parameters:
- message- The detail message
- cause- The cause
 
- 
CommandExceptionConstructs a newCommandExceptionwith the given message.- Parameters:
- message- The detail message
- includeUsage- Whether to include usage in the exception
 
- 
CommandExceptionConstructs a newCommandExceptionwith the given message and the given cause.- Parameters:
- message- The detail message
- cause- The cause
- includeUsage- Whether to include the usage in the exception
 
 
- 
- 
Method Details- 
shouldIncludeUsagepublic boolean shouldIncludeUsage()Gets whether the exception should include usage in the presentation of the exception/stack-trace.- Returns:
- Whether to include usage in the exception
 
 
-