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

Method Error

interpreter/attributes.go:1463–1474  ·  view source on GitHub ↗

Error implements the error interface method.

()

Source from the content-addressed store, hash-verified

1461
1462// Error implements the error interface method.
1463func (e *resolutionError) Error() string {
1464 if e.missingKey != nil {
1465 return fmt.Sprintf("no such key: %v", e.missingKey)
1466 }
1467 if e.missingIndex != nil {
1468 return fmt.Sprintf("index out of bounds: %v", e.missingIndex)
1469 }
1470 if e.missingAttribute != "" {
1471 return fmt.Sprintf("no such attribute(s): %s", e.missingAttribute)
1472 }
1473 return "invalid attribute"
1474}
1475
1476// Is implements the errors.Is() method used by more recent versions of Go.
1477func (e *resolutionError) Is(err error) bool {

Calls

no outgoing calls