Class ParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- cloud.commandframework.exceptions.parsing.ParserException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BooleanArgument.BooleanParseException
,CharArgument.CharParseException
,EnumArgument.EnumParseException
,FlagArgument.FlagParseException
,NoInputProvidedException
,NumberParseException
,StringArgument.StringParseException
,UUIDArgument.UUIDParseException
public class ParserException extends java.lang.IllegalArgumentException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ParserException(@NonNull java.lang.Class<?> argumentParser, @NonNull CommandContext<?> context, @NonNull Caption errorCaption, @NonNull CaptionVariable... captionVariables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull CaptionVariable @NonNull []
captionVariables()
Get a copy of the caption variables present in this parser exception.@NonNull Caption
errorCaption()
Get the error caption for this parser exception@NonNull java.lang.Class<?>
getArgumentParserClass()
Get the argument parser@NonNull CommandContext<?>
getContext()
Get the command contextjava.lang.String
getMessage()
-
-
-
Constructor Detail
-
ParserException
protected ParserException(@NonNull java.lang.Class<?> argumentParser, @NonNull CommandContext<?> context, @NonNull Caption errorCaption, @NonNull CaptionVariable... captionVariables)
-
-
Method Detail
-
getMessage
public final java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
errorCaption
public @NonNull Caption errorCaption()
Get the error caption for this parser exception- Returns:
- The caption
- Since:
- 1.4.0
-
captionVariables
public @NonNull CaptionVariable @NonNull [] captionVariables()
Get a copy of the caption variables present in this parser exception. The returned array may be empty if no variables are present.- Returns:
- The caption variables
- Since:
- 1.4.0
-
getArgumentParserClass
public final @NonNull java.lang.Class<?> getArgumentParserClass()
Get the argument parser- Returns:
- Argument parser
-
getContext
public final @NonNull CommandContext<?> getContext()
Get the command context- Returns:
- Command context
-
-