Class MeasurementParseException

All Implemented Interfaces:
Serializable

public class MeasurementParseException extends MeasurementException
Signals that an error has been reached unexpectedly while parsing.
Since:
2.0
Version:
1.1, March 27, 2018
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • position

      private int position
      The zero-based character position in the string being parsed at which the error was found while parsing.
    • data

      private CharSequence data
      The original input data.
  • Constructor Details

    • MeasurementParseException

      public MeasurementParseException(String message, CharSequence parsedData, int position)
      Constructs a MeasurementParseException with the specified detail message, parsed text and index. A detail message is a String that describes this particular exception.
      Parameters:
      message - the detail message
      parsedData - the parsed text, should not be null
      position - the position where the error was found while parsing.
    • MeasurementParseException

      public MeasurementParseException(CharSequence parsedData, int position)
      Constructs a MeasurementParseException with the parsed text and offset. A detail message is a String that describes this particular exception.
      Parameters:
      parsedData - the parsed text, should not be null
      position - the position where the error is found while parsing.
    • MeasurementParseException

      public MeasurementParseException(Throwable cause)
      Constructs a MeasurementParseException with the specified cause.
      Parameters:
      cause - the root cause
    • MeasurementParseException

      public MeasurementParseException(String message)
      Constructs a MeasurementParseException with the specified detail message.
      Parameters:
      message - the detail message
  • Method Details

    • getPosition

      public int getPosition()
      Returns the position where the error was found.
      Returns:
      the position of the error
    • getParsedString

      public String getParsedString()
      Returns the string that was being parsed.
      Returns:
      the parsed string, or null, if null was passed as input.