Module java.money

Class MonetaryParseException

All Implemented Interfaces:
Serializable

public class MonetaryParseException extends MonetaryException
Signals that an error has been reached unexpectedly while parsing.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      serialVersionUID.
      See Also:
    • errorIndex

      private int errorIndex
      The zero-based character offset into the string being parsed at which the error was found during parsing.
    • data

      private CharSequence data
      The original input data.
  • Constructor Details

    • MonetaryParseException

      public MonetaryParseException(String message, CharSequence parsedData, int errorIndex)
      Constructs a MonetaryParseException 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
      errorIndex - the position where the error is found while parsing.
    • MonetaryParseException

      public MonetaryParseException(CharSequence parsedData, int errorIndex)
      Constructs a MonetaryParseException 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
      errorIndex - the position where the error is found while parsing.
  • Method Details

    • getErrorIndex

      public int getErrorIndex()
      Returns the index where the error was found.
      Returns:
      the index where the error was found
    • getInput

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