public interface ErrorReporter
| Modifier and Type | Interface and Description |
|---|---|
static class |
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.soyparse.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,
SoyError error,
String... args)
Reports the given
error, formatted according to args and associated with
the given sourceLocation. |
void report(SourceLocation sourceLocation, SoyError error, String... args)
error, formatted according to args and associated with
the given sourceLocation.ErrorReporter.Checkpoint checkpoint()
errorsSince(com.google.template.soy.soyparse.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).