Package javax.measure.format
Class MeasurementParseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.measure.MeasurementException
-
- javax.measure.format.MeasurementParseException
-
- All Implemented Interfaces:
java.io.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
- Author:
- Werner Keil
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MeasurementParseException(java.lang.CharSequence parsedData, int position)Constructs a MeasurementParseException with the parsed text and offset.MeasurementParseException(java.lang.String message)Constructs a MeasurementParseException with the specified detail message.MeasurementParseException(java.lang.String message, java.lang.CharSequence parsedData, int position)Constructs a MeasurementParseException with the specified detail message, parsed text and index.MeasurementParseException(java.lang.Throwable cause)Constructs a MeasurementParseException 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.
-
-
-
Constructor Detail
-
MeasurementParseException
public MeasurementParseException(java.lang.String message, java.lang.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 messageparsedData- the parsed text, should not be nullposition- the position where the error was found while parsing.
-
MeasurementParseException
public MeasurementParseException(java.lang.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 nullposition- the position where the error is found while parsing.
-
MeasurementParseException
public MeasurementParseException(java.lang.Throwable cause)
Constructs a MeasurementParseException with the specified cause.- Parameters:
cause- the root cause
-
MeasurementParseException
public MeasurementParseException(java.lang.String message)
Constructs a MeasurementParseException with the specified detail message.- Parameters:
message- the detail message
-
-
Method Detail
-
getPosition
public int getPosition()
Returns the position where the error was found.- Returns:
- the position of the error
-
getParsedString
public java.lang.String getParsedString()
Returns the string that was being parsed.- Returns:
- the parsed string, or
null, ifnullwas passed as input.
-
-