Package discord4j.command.util
Class CommandException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- discord4j.command.util.CommandException
-
- All Implemented Interfaces:
Serializable
public class CommandException extends RuntimeException
An abstract class for propagating non-fatal, user-facing, command-caused errors.- See Also:
CommandErrorHandler
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CommandException(String response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
response()
Returns a human-readable error message for the user who caused this error to read.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-