public class ParserException extends MeasurementException
| Modifier and Type | Field and Description |
|---|---|
private java.lang.CharSequence |
data
The original input data.
|
private int |
position
The zero-based character position in the string being parsed at which the error was found while parsing.
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ParserException(java.lang.CharSequence parsedData,
int position)
Constructs a ParserException with the parsed text and offset.
|
ParserException(java.lang.String message,
java.lang.CharSequence parsedData,
int position)
Constructs a ParserException with the specified detail message, parsed text and index.
|
ParserException(java.lang.Throwable cause)
Constructs a ParserException with the specified cause.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getParsedString()
Returns the string that was being parsed.
|
int |
getPosition()
Returns the position where the error was found.
|
private static final long serialVersionUID
private int position
private java.lang.CharSequence data
public ParserException(java.lang.String message,
java.lang.CharSequence parsedData,
int position)
message - the detail messageparsedData - the parsed text, should not be nullposition - the position where the error was found while parsing.public ParserException(java.lang.CharSequence parsedData,
int position)
parsedData - the parsed text, should not be nullposition - the position where the error is found while parsing.public ParserException(java.lang.Throwable cause)
cause - the root cause