Package javax.measure.format
Class ParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.measure.MeasurementException
-
- javax.measure.format.ParserException
-
- All Implemented Interfaces:
java.io.Serializable
public class ParserException extends MeasurementException
Signals that an error has been reached unexpectedly while parsing.- Since:
- 1.0
- Version:
- 1.0, August 8, 2016
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.CharSequencedataThe original input data.private intpositionThe zero-based character position in the string being parsed at which the error was found while parsing.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetParsedString()Returns the string that was being parsed.intgetPosition()Returns the position where the error was found.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
position
private int position
The zero-based character position in the string being parsed at which the error was found while parsing.
-
data
private java.lang.CharSequence data
The original input data.
-
-
Constructor Detail
-
ParserException
public ParserException(java.lang.String message, java.lang.CharSequence parsedData, int position)Constructs a ParserException 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 nullposition- the position where the error was found while parsing.
-
ParserException
public ParserException(java.lang.CharSequence parsedData, int position)Constructs a ParserException 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 nullposition- the position where the error is found while parsing.
-
ParserException
public ParserException(java.lang.Throwable cause)
Constructs a ParserException with the specified cause.- Parameters:
cause- the root cause
-
-