Package com.aliucord.entities
Class CommandContext.RequiredArgumentWasNullException
-
- All Implemented Interfaces:
-
java.io.Serializable
public class CommandContext.RequiredArgumentWasNullException extends RuntimeException
Looks like Discord's required args are unreliable and are sometimes accepted even if empty. Or a plugin dev may just forget to mark an argument as required which leads to ugly NPEs. Thus, throw a custom exception and handle it in the command handler to present the user a simple message, not a scary stacktrace.
-
-
Constructor Summary
Constructors Constructor Description CommandContext.RequiredArgumentWasNullException(String name)
-
Method Summary
Modifier and Type Method Description -
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CommandContext.RequiredArgumentWasNullException
CommandContext.RequiredArgumentWasNullException(String name)
-
-
-
-