Package revxrsal.commands.exception
Class CommandErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
revxrsal.commands.exception.SendableException
revxrsal.commands.exception.CommandErrorException
- All Implemented Interfaces:
Serializable
Represents a command error, for example when an invalid value is returned, a condition
is violated, or an illegal value is inputted, and validated through a parameter validator.
This exception should be used to directly transfer error messages to the CommandActor
,
and is always used in command-fail contexts. For exceptions that only reply to the
actor, see SendMessageException
.
- See Also:
-
Constructor Summary
ConstructorDescriptionCommandErrorException
(String message, Object... arguments) Constructs a newCommandErrorException
with an inferred actor -
Method Summary
Modifier and TypeMethodDescriptionvoid
sendTo
(@NotNull CommandActor actor) Sends the message to the given actorMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandErrorException
Constructs a newCommandErrorException
with an inferred actor- Parameters:
message
- Message to send
-
-
Method Details
-
sendTo
Sends the message to the given actor- Specified by:
sendTo
in classSendableException
- Parameters:
actor
- Actor to send to
-