Class ParserException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BooleanArgument.BooleanParseException, CharArgument.CharParseException, DurationArgument.DurationParseException, EnumArgument.EnumParseException, FlagArgument.FlagParseException, NoInputProvidedException, NumberParseException, StringArgument.StringParseException, UUIDArgument.UUIDParseException

@API(status=STABLE) public class ParserException extends IllegalArgumentException
See Also:
  • Constructor Details

  • Method Details

    • getMessage

      public final String getMessage()
      Overrides:
      getMessage in class Throwable
    • errorCaption

      @API(status=STABLE, since="1.4.0") public @NonNull Caption errorCaption()
      Get the error caption for this parser exception
      Returns:
      The caption
      Since:
      1.4.0
    • captionVariables

      @API(status=STABLE, since="1.4.0") 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 Class<?> getArgumentParserClass()
      Get the argument parser
      Returns:
      Argument parser
    • getContext

      public final @NonNull CommandContext<?> getContext()
      Get the command context
      Returns:
      Command context