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

Function getErrorExprID

ext/formatting.go:459–469  ·  view source on GitHub ↗

getErrorExprID determines which list literal argument triggered a type-disagreement for the purposes of more accurate error message reports.

(id int64, err error)

Source from the content-addressed store, hash-verified

457// getErrorExprID determines which list literal argument triggered a type-disagreement for the
458// purposes of more accurate error message reports.
459func getErrorExprID(id int64, err error) int64 {
460 fmtErr, ok := err.(formatError)
461 if ok {
462 return fmtErr.id
463 }
464 wrapped := errors.Unwrap(err)
465 if wrapped != nil {
466 return getErrorExprID(id, wrapped)
467 }
468 return id
469}
470
471// matchConstantFormatStringWithListLiteralArgs matches all valid expression nodes for string
472// format checking.

Callers 2

ValidateMethod · 0.85
ValidateMethod · 0.85

Calls 1

UnwrapMethod · 0.65

Tested by

no test coverage detected