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 |
---|---|
Object |
acceptCatchingErrors(Node node,
Object data)
calls jjtAccept inside a try catch block, adding the error if necessary
|
void |
addError(Exception e)
Adds an error message to the list of errors.
|
void |
clearErrors()
Reset the list of errors.
|
Exception |
getError()
Returns the Exception or null if no error.
|
String |
getErrorsMessage()
Returns the error messages.
|
boolean |
hasErrors()
Are their any errors?
|
public Object acceptCatchingErrors(Node node, Object data)
public void clearErrors()
public boolean hasErrors()
public void addError(Exception e)
public String getErrorsMessage()
public Exception getError()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics