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

Method Error

interpreter/attributes.go:1669–1680  ·  view source on GitHub ↗

Error implements the error interface method.

()

Source from the content-addressed store, hash-verified

1667
1668// Error implements the error interface method.
1669func (e *resolutionError) Error() string {
1670 if e.missingKey != nil {
1671 return fmt.Sprintf("no such key: %v", e.missingKey)
1672 }
1673 if e.missingIndex != nil {
1674 return fmt.Sprintf("index out of bounds: %v", e.missingIndex)
1675 }
1676 if e.missingAttribute != "" {
1677 return fmt.Sprintf("no such attribute(s): %s", e.missingAttribute)
1678 }
1679 return "invalid attribute"
1680}
1681
1682// Is implements the errors.Is() method used by more recent versions of Go.
1683func (e *resolutionError) Is(err error) bool {

Calls

no outgoing calls