type Error … type Err … var ErrType … var errDivideByZero … var errModulusByZero … var errIntOverflow … var errUintOverflow … var errDurationOverflow … var errTimestampOverflow … var celErrTimestampOverflow … var celErrNoSuchOverload … // NewErr creates a new Err described by the format string and args. // TODO: Audit the use of this function and standardize the error messages and codes. func NewErr(format string, args ...any) ref.Val { … } // NewErrWithNodeID creates a new Err described by the format string and args. // TODO: Audit the use of this function and standardize the error messages and codes. func NewErrWithNodeID(id int64, format string, args ...any) ref.Val { … } // LabelErrNode returns val unaltered it is not an Err or if the error has a non-zero // AST node ID already present. Otherwise the id is added to the error for // recovery with the Err.NodeID method. func LabelErrNode(id int64, val ref.Val) ref.Val { … } // NoSuchOverloadErr returns a new types.Err instance with a no such overload message. func NoSuchOverloadErr() ref.Val { … } // UnsupportedRefValConversionErr returns a types.NewErr instance with a no such conversion // message that indicates that the native value could not be converted to a CEL ref.Val. func UnsupportedRefValConversionErr(val any) ref.Val { … } // MaybeNoSuchOverloadErr returns the error or unknown if the input ref.Val is one of these types, // else a new no such overload error. func MaybeNoSuchOverloadErr(val ref.Val) ref.Val { … } // ValOrErr either returns the existing error or creates a new one. // TODO: Audit the use of this function and standardize the error messages and codes. func ValOrErr(val ref.Val, format string, args ...any) ref.Val { … } // WrapErr wraps an existing Go error value into a CEL Err value. func WrapErr(err error) ref.Val { … } // ConvertToNative implements ref.Val.ConvertToNative. func (e *Err) ConvertToNative(typeDesc reflect.Type) (any, error) { … } // ConvertToType implements ref.Val.ConvertToType. func (e *Err) ConvertToType(typeVal ref.Type) ref.Val { … } // Equal implements ref.Val.Equal. func (e *Err) Equal(other ref.Val) ref.Val { … } // String implements fmt.Stringer. func (e *Err) String() string { … } // Type implements ref.Val.Type. func (e *Err) Type() ref.Type { … } // Value implements ref.Val.Value. func (e *Err) Value() any { … } // NodeID returns the AST node ID of the expression that returned the error. func (e *Err) NodeID() int64 { … } // Is implements errors.Is. func (e *Err) Is(target error) bool { … } // Unwrap implements errors.Unwrap. func (e *Err) Unwrap() error { … } // IsError returns whether the input element ref.Type or ref.Val is equal to // the ErrType singleton. func IsError(val ref.Val) bool { … }