ReportErrorAtID records an error at a source location and expression id.
(id int64, l Location, format string, args ...any)
| 53 | |
| 54 | // ReportErrorAtID records an error at a source location and expression id. |
| 55 | func (e *Errors) ReportErrorAtID(id int64, l Location, format string, args ...any) { |
| 56 | e.numErrors++ |
| 57 | if e.numErrors > e.maxErrorsToReport { |
| 58 | return |
| 59 | } |
| 60 | err := &Error{ |
| 61 | ExprID: id, |
| 62 | Location: l, |
| 63 | Message: fmt.Sprintf(format, args...), |
| 64 | } |
| 65 | e.errors = append(e.errors, err) |
| 66 | } |
| 67 | |
| 68 | // GetErrors returns the list of observed errors. |
| 69 | func (e *Errors) GetErrors() []*Error { |
no outgoing calls
no test coverage detected