public abstract class AbstractErrorReporter extends Object implements ErrorReporter
checkpoint() and
ErrorReporter.errorsSince(Checkpoint) in terms of a template method
getCurrentNumberOfErrors().ErrorReporter.Checkpoint| Constructor and Description |
|---|
AbstractErrorReporter() |
| Modifier and Type | Method and Description |
|---|---|
ErrorReporter.Checkpoint |
checkpoint()
Returns an opaque token (the checkpoint) that callers can later pass back into
ErrorReporter.errorsSince(com.google.template.soy.error.ErrorReporter.Checkpoint) to see if any errors have occurred in the interim. |
boolean |
errorsSince(ErrorReporter.Checkpoint checkpoint)
Returns true iff errors have occurred since
checkpoint was obtained
from ErrorReporter.checkpoint(). |
protected abstract int |
getCurrentNumberOfErrors() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreportprotected abstract int getCurrentNumberOfErrors()
public final ErrorReporter.Checkpoint checkpoint()
ErrorReporterErrorReporter.errorsSince(com.google.template.soy.error.ErrorReporter.Checkpoint) to see if any errors have occurred in the interim.checkpoint in interface ErrorReporterpublic final boolean errorsSince(ErrorReporter.Checkpoint checkpoint)
ErrorReportercheckpoint was obtained
from ErrorReporter.checkpoint().
Useful for callers whose outputs are dependent on whether some code path resulted in new errors (for example, returning an error node if parsing encountered errors).
errorsSince in interface ErrorReporter