public interface ErrorReporter
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ErrorReporter.Checkpoint
Opaque token, used by
checkpoint() and errorsSince(com.google.template.soy.error.ErrorReporter.Checkpoint). |
| Modifier and Type | Method and Description |
|---|---|
ErrorReporter.Checkpoint |
checkpoint()
Returns an opaque token (the checkpoint) that callers can later pass back into
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 checkpoint(). |
void |
report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args)
Reports the given
error, formatted according to args and associated with
the given sourceLocation. |
void report(SourceLocation sourceLocation, SoyErrorKind error, Object... args)
error, formatted according to args and associated with
the given sourceLocation.ErrorReporter.Checkpoint checkpoint()
errorsSince(com.google.template.soy.error.ErrorReporter.Checkpoint) to see if any errors have occurred in the interim.boolean errorsSince(ErrorReporter.Checkpoint checkpoint)
checkpoint was obtained
from 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).