Package studio.mevera.imperat.exception
Class InvalidSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
studio.mevera.imperat.exception.CommandException
studio.mevera.imperat.exception.InvalidSyntaxException
- All Implemented Interfaces:
Serializable
Thrown when a command's syntax does not match any valid usage pathway.
Carries %invalid_usage% and %closest_usage% placeholders
which are used by the throwable resolver in ImperatConfigImpl.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidSyntaxException(String invalidUsage, @Nullable CommandPathway<S> closestUsage) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidSyntaxException
public InvalidSyntaxException(String invalidUsage, @Nullable @Nullable CommandPathway<S> closestUsage) - Parameters:
invalidUsage- what the user actually typed (e.g. "/give sword stone")closestUsage- the closest valid usage hint, ornullif unavailable
-
-
Method Details
-
getInvalidUsage
-
getClosestUsage
-