MCPcopy Index your code
hub / github.com/antlr/codebuff / ErrorBuffer

Class ErrorBuffer

output/java8/1.4.17/ErrorBuffer.java:37–70  ·  view source on GitHub ↗

Used during tests to track all errors.

Source from the content-addressed store, hash-verified

35
36
37public class ErrorBuffer implements STErrorListener {
38 public List<STMessage> errors = new ArrayList<STMessage>();
39
40 @Override
41 public void compileTimeError(STMessage msg) {
42 errors.add(msg);
43 }
44
45 @Override
46 public void runTimeError(STMessage msg) {
47 if ( msg.error!= ErrorType.NO_SUCH_PROPERTY ) { // ignore these
48 errors.add(msg);
49 }
50 }
51
52 @Override
53 public void IOError(STMessage msg) {
54 errors.add(msg);
55 }
56
57 @Override
58 public void internalError(STMessage msg) {
59 errors.add(msg);
60 }
61
62 @Override
63 public String toString() {
64 StringBuilder buf = new StringBuilder();
65 for (STMessage m : errors) {
66 buf.append(m.toString() +Misc.newline);
67 }
68 return buf.toString();
69 }
70}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected