Class ArgumentNotAvailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
eu.cloudnetservice.node.command.exception.ArgumentNotAvailableException
- All Implemented Interfaces:
Serializable
This exception is used when argument parsers need to hard fail the argument parsing because there is a syntax error.
The message of the exception is sent to the user therefore it should be translated and formatted correctly.
Note: The fillInStackTrace() method is empty, therefore the creation of this
exception is not heavy, and it can be used frequently.
- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentNotAvailableException(@NonNull String message) Constructs a new exception for argument parse failing. -
Method Summary
Modifier and TypeMethodDescriptionReturns the own instance of this exception without filling the stacktrace, as the stacktrace is not needed for this exception.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ArgumentNotAvailableException
Constructs a new exception for argument parse failing.- Parameters:
message- the message to send to the user.- Throws:
NullPointerException- if message is null.
-
-
Method Details
-
fillInStackTrace
Returns the own instance of this exception without filling the stacktrace, as the stacktrace is not needed for this exception.- Overrides:
fillInStackTracein classThrowable- Returns:
- this instance for chaining.
-