java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.money.MonetaryException
javax.money.format.MonetaryParseException
- All Implemented Interfaces:
java.io.Serializable
public class MonetaryParseException extends MonetaryException
Signals that an error has been reached unexpectedly while parsing.
- Author:
- Werner Keil
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description MonetaryParseException(java.lang.CharSequence parsedData, int errorIndex)
Constructs a MonetaryParseException with the parsed text and offset.MonetaryParseException(java.lang.String message, java.lang.CharSequence parsedData, int errorIndex)
Constructs a MonetaryParseException with the specified detail message, parsed text and index. -
Method Summary
Modifier and Type Method Description int
getErrorIndex()
Returns the index where the error was found.java.lang.String
getInput()
Returns the string that was being parsed.
-
Constructor Details
-
MonetaryParseException
public MonetaryParseException(java.lang.String message, java.lang.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 messageparsedData
- the parsed text, should not be nullerrorIndex
- the position where the error is found while parsing.
-
MonetaryParseException
public MonetaryParseException(java.lang.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 nullerrorIndex
- 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 java.lang.String getInput()Returns the string that was being parsed.- Returns:
- the parsed input string, or
null
, ifnull
was passed as input.
-