public abstract class ErrorCatchingVisitor extends DoNothingVisitor
clearErrors(); Object res = (Node) node.jjtAccept(this,data); if(hasErrors()) throw new ParseException(getErrors());
Constructor and Description |
---|
ErrorCatchingVisitor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
acceptCatchingErrors(Node node,
java.lang.Object data)
calls jjtAccept inside a try catch block, adding the error if necessary
|
void |
addError(java.lang.Exception e)
Adds an error message to the list of errors.
|
void |
clearErrors()
Reset the list of errors.
|
java.lang.Exception |
getError()
Returns the Exception or null if no error.
|
java.lang.String |
getErrorsMessage()
Returns the error messages.
|
boolean |
hasErrors()
Are their any errors?
|
acceptChildrenAsArray, visit, visit, visit, visit, visit
public java.lang.Object acceptCatchingErrors(Node node, java.lang.Object data)
public void clearErrors()
public boolean hasErrors()
public void addError(java.lang.Exception e)
public java.lang.String getErrorsMessage()
public java.lang.Exception getError()
http://www.singularsys.com/jep Copyright © 2007 Singular Systems