ppg.parse
Class ParserError
java.lang.Object
java.lang.Throwable
java.lang.Exception
ppg.parse.ParserError
- All Implemented Interfaces:
- java.io.Serializable
public class ParserError
- extends java.lang.Exception
This error is thrown when the parser has an internal error -- the user should not see these
in the ideal case -- ex: we have a null somewhere.
If there is a problem with the source, either a syntaxError or SemanticError will be thrown,
depending on nature of the error
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
errorMessage
This contains the errorMessage for that caused the exception |
Constructor Summary |
ParserError()
In rare cases when no error message is know return a generic message |
ParserError(java.lang.String message)
|
ParserError(java.lang.String file,
java.lang.String msg,
Token tok)
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
errorMessage
protected java.lang.String errorMessage
- This contains the errorMessage for that caused the exception
ParserError
public ParserError(java.lang.String message)
- Parameters:
message
- The massage that contains a description of the error
ParserError
public ParserError(java.lang.String file,
java.lang.String msg,
Token tok)
- Parameters:
file
- The file where the error came from.msg
- The message that contains a description of the error.tok
- Token from which to get the line number and the text
of the error token.
ParserError
public ParserError()
- In rare cases when no error message is know return a generic message
getErrorMessage
public java.lang.String getErrorMessage()
- Returns:
- String that is the message of the error