Class ArgumentParseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
revxrsal.commands.exception.ArgumentParseException
All Implemented Interfaces:
Serializable

public class ArgumentParseException extends RuntimeException
Exception thrown when an error occurs while parsing arguments.
See Also:
  • Constructor Details

    • ArgumentParseException

      public ArgumentParseException(String message, String source, int position)
      Return a new ArgumentParseException with the given message, source and position.
      Parameters:
      message - The message to use for this exception
      source - The source string being parsed
      position - The current position in the source string
    • ArgumentParseException

      public ArgumentParseException(String message, Throwable cause, String source, int position)
      Return a new ArgumentParseException with the given message, cause, source and position.
      Parameters:
      message - The message to use for this exception
      cause - The cause for this exception
      source - The source string being parsed
      position - The current position in the source string
  • Method Details

    • getAnnotatedPosition

      public String getAnnotatedPosition()
      Return a string pointing to the position of the arguments when this exception occurs.
      Returns:
      The appropriate position string
    • getPosition

      public int getPosition()
      Gets the position of the last fetched argument in the provided source string.
      Returns:
      The source string to get position for
    • getSourceString

      public String getSourceString()
      Returns the source string arguments are being parsed from.
      Returns:
      The source string