Class ArgumentSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.minestom.server.command.builder.exception.ArgumentSyntaxException
- All Implemented Interfaces:
Serializable
Exception triggered when an
Argument is wrongly parsed.
Retrieved in ArgumentCallback defined in Command.setArgumentCallback(ArgumentCallback, Argument).
Be aware that the message returned by Throwable.getMessage() is only here for debugging purpose,
you should refer to getErrorCode() to identify the exceptions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentSyntaxException(@NotNull String message, @NotNull String input, int errorCode) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ArgumentSyntaxException
-
-
Method Details
-
fillInStackTrace
- Overrides:
fillInStackTracein classThrowable
-
getInput
Gets the problematic command input.- Returns:
- the command input which triggered the exception
-
getErrorCode
public int getErrorCode()Gets the error code of the exception.The code is decided arbitrary by the argument, check the argument class to know the meaning of each one.
- Returns:
- the argument error code
-