java.text
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.text.ParseException
- All Implemented Interfaces:
- Serializable
public class ParseException
- extends Exception
This exception is thrown when an unexpected error occurs during parsing.
- See Also:
Format
,
FieldPosition
,
Serialized Form
Constructor Summary |
ParseException(String s,
int offset)
This method initializes a new instance of ParseException
with a detailed error message and a error position. |
Method Summary |
int |
getErrorOffset()
This method returns the position where the error occurred. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ParseException
public ParseException(String s,
int offset)
- This method initializes a new instance of
ParseException
with a detailed error message and a error position.
- Parameters:
s
- the descriptive message describing the erroroffset
- the position where the error was encountered
getErrorOffset
public int getErrorOffset()
- This method returns the position where the error occurred.
- Returns:
- the position where the error occurred