MCPcopy Create free account
hub / github.com/cel-expr/cel-go / ReportErrorAtID

Method ReportErrorAtID

common/errors.go:55–66  ·  view source on GitHub ↗

ReportErrorAtID records an error at a source location and expression id.

(id int64, l Location, format string, args ...any)

Source from the content-addressed store, hash-verified

53
54// ReportErrorAtID records an error at a source location and expression id.
55func (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.
69func (e *Errors) GetErrors() []*Error {

Callers 2

ReportErrorMethod · 0.95
ReportErrorStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected