// AddError add error to ReturnError
421970
func (t *ReturnError) AddError(err error) {
	if err == nil {
		return
	}
	t.Error = errutil.NewErrorsSkip(1, err, t.Error)
	if t.Status == 0 {
		t.Status = 404
	}
}
38542
func (ac *accumulator) AddError(err error) {
	if err == nil {
		return
	}
	NErrors.Incr(1)
	log.Printf("E! [%s]: Error in plugin: %v", ac.maker.Name(), err)
}
390501
func (c *Client) UseError(fn context.HandlerFunc) *Client {
	c.Middleware.UseError(fn)
	return c
}
695507
func (s *Storage) AddIosError(count int64) {
	total := s.GetIosError() + count
	redisClient.Set(storage.IosErrorKey, strconv.Itoa(int(total)), 0)
}
181560
func WriteError(err []byte, buf *goetty.ByteBuf) {
	buf.WriteByte('-')
	if err != nil {
		buf.WriteByte(' ')
		buf.Write(err)
	}
	buf.Write(Delims)
}
1148771
func (err *MultiError) Add(errOrNil error) {
	if err != nil && errOrNil != nil {
		*err = append(*err, errOrNil)
	}
}
498632
func (entry *Entry) WithError(err error) *Entry {
	return entry.WithField(ErrorKey, err)
}
1235543
func (m *MultiError) Error() string {
	m.mutex.Lock()
	defer m.mutex.Unlock()

	formattedError := make([]string, len(m.errs))
	for i, e := range m.errs {
		formattedError[i] = e.Error()
	}

	return strings.Join(formattedError, ", ")
}
846306
func FormatError(err error) []byte {
	jsonError, ok := err.(*jsonmessage.JSONError)
	if !ok {
		jsonError = &jsonmessage.JSONError{Message: err.Error()}
	}
	if b, err := json.Marshal(&jsonmessage.JSONMessage{Error: jsonError, ErrorMessage: err.Error()}); err == nil {
		return appendNewline(b)
	}
	return []byte(`{"error":"format error"}` + streamNewline)
}
137238
func (mux *Mux) HandleError(err error, h Handler) {
	mux.mu.Lock()
	defer mux.mu.Unlock()
	mux.errm[err] = h
}
329958
func (errs Errors) Error() string {
	var errors = []string{}
	for _, e := range errs {
		errors = append(errors, e.Error())
	}
	return strings.Join(errors, "; ")
}
994870
func (logger *Logger) WithError(err error) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithError(err)
}
286119
func (m *Mux) UseError(fn c.HandlerFunc) *Mux {
	m.Middleware.UseError(fn)
	return m
}
260242
func formatError(format string, err error) error {
	if s, ok := err.(errors.APIStatus); ok {
		se := &errors.StatusError{ErrStatus: s.Status()}
		se.ErrStatus.Message = fmt.Sprintf(format, se.ErrStatus.Message)
		return se
	}
	return fmt.Errorf(format, err)
}
930057
func (r *Request) UseError(fn context.HandlerFunc) *Request {
	r.Middleware.UseError(fn)
	return r
}
1289275
func (s *LambdaFunctionTimedOutEventDetails) SetError(v string) *LambdaFunctionTimedOutEventDetails {
	s.Error = &v
	return s
}
30
func (s *TaskFailedEventDetails) SetError(v string) *TaskFailedEventDetails {
	s.Error = &v
	return s
}