// AnErr adds the field key with serialized err to the *Event context.
// If err is nil, no field is added.
334346
func (e *Event) AnErr(key string, err error) *Event {
	if e == nil {
		return e
	}
	switch m := ErrorMarshalFunc(err).(type) {
	case nil:
		return e
	case LogObjectMarshaler:
		return e.Object(key, m)
	case error:
		return e.Str(key, m.Error())
	case string:
		return e.Str(key, m)
	default:
		return e.Interface(key, m)
	}
}
603237
func (is *Is) Err(e error) {
	is.TB.Helper()
	if isNil(e) {
		fail(is, "expected error")
	}
}
90922
func (dec *StreamDecoder) Err() error {
	select {
	case <-dec.done:
		dec.mux.RLock()
		defer dec.mux.RUnlock()
		return dec.err
	default:
		return nil
	}
}
88903
func (c *Ctrl) Err() error {
	if c.Streamer == nil {
		return nil
	}
	return c.Streamer.Err()
}
881900
func (e *Event) Errs(key string, errs []error) *Event {
	if e == nil {
		return e
	}
	arr := Arr()
	for _, err := range errs {
		switch m := ErrorMarshalFunc(err).(type) {
		case LogObjectMarshaler:
			arr = arr.Object(m)
		case error:
			arr = arr.Err(m)
		case string:
			arr = arr.Str(m)
		default:
			arr = arr.Interface(m)
		}
	}

	return e.Array(key, arr)
}
585078
func (i *PendingItem) SetErr(err error) {
	if err == nil {
		panic("internal error")
	}
	i.lock.Lock()
	defer i.lock.Unlock()
	if i.err == nil {
		i.err = err
		for _, child := range i.linked {
			child.lock.Lock()
			child.err = err
			child.lock.Unlock()
		}
	}
}
1263009
func (err Error) WithErr(name string) *Error {
	err.Err = name
	return &err
}
1009504
func (c *Client) scanErr() error {
	if err := c.scanner.Err(); err != nil {
		return err
	}
	return io.ErrUnexpectedEOF
}
601393
func (scope *Scope) Err(err error) error {
	if err != nil {
		scope.db.AddError(err)
	}
	return err
}
559202
func checkErr(err error) (ok bool) {
	switch err {
	case nil:
		return true
	case redis.Nil:
		return false
	default:
		log.Panicf("rmq redis error is not nil %s", err)
		return false
	}
}
841166
func WrappedErr(err error) error {
	cast, ok := err.(*Error)
	if !ok {
		return err
	}
	return cast.WrappedErr()
}
804163
func (response *Response) Err() error {
	if len(response.Errors) > 0 {
		return response.Errors[0]
	}
	return nil
}
1086008
func NewStoreKeyErr(key string) error {
	return &types.ErrStoreKey{
		Goof: goof.WithField("storeKey", key, "missing store key"),
	}
}
684640
func (l *Logger) Err(format string, v ...interface{}) {
	fmt.Fprint(l.stderr, addColor(ErrorPrefix+" ", Red))
	fmt.Fprintf(l.stderr, appendNewLine(format), v...)
}
242259
func (tr Row) DurationErr(nn int) (val time.Duration, err error) {
	switch data := tr[nn].(type) {
	case nil:
	case time.Duration:
		val = data
	case []byte:
		val, err = ParseDuration(string(data))
	case *[]byte:
		val, err = ParseDuration(string(*data))
	default:
		err = errors.New(
			fmt.Sprintf("Can't convert `%v` to time.Duration", data),
		)
	}
	return
}
549773
func (e Errors) Err() error {
	if len(e) == 0 {
		return nil
	}

	return &MultiError{Errors: e}
}
533190
func (e *Elector) sendErr(err error) {
	e.sendEvent(Event{Err: err})
}