edu.hws.jcm.data
Class ParseError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.hws.jcm.data.ParseError
- All Implemented Interfaces:
- Serializable
public class ParseError
- extends RuntimeException
Represents a syntax error that is found while a string is being parsed.
- See Also:
- Serialized Form
Field Summary |
ParserContext |
context
The parsing context that was in effect
at the time the error occurred. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
context
public ParserContext context
- The parsing context that was in effect
at the time the error occurred. This includes
the string that was being processed and the
position in the string where the error occured.
These values are context.data and context.pos.
ParseError
public ParseError(String message,
ParserContext context)
- Create a new ParseError with a given error message and parsing context.