// Convenience function to call ErrorString with a format string
353569
func Errorf(c web.C, rw http.ResponseWriter, code int, message string, args ...interface{}) {
	str := fmt.Sprintf(message, args...)
	ErrorString(c, rw, code, str)
}
940651
func (err *Error) Error() string {
	return fmt.Sprintf("[Error]:%v: %v %v - %v %v",
		err.StatusCode, err.Method, err.URL, err.ErrorCode, err.Reason)
}
848874
func (e Error) Error() string {
	if e.Err != nil {
		return e.Desc + ": " + e.Err.Error()
	}
	return e.Desc
}
487733
func (err Error) Format() (string, error) {
	errlog := errorForLog{err.Code, err.Err, err.Msg, err.Data, err.Stack}
	res, e := json.Marshal(errlog)
	if e == nil {
		return string(res), nil
	}
	return "", e
}
874529
func (v *StringRule) Error(message string) *StringRule {
	return NewStringRule(v.validate, message)
}
1082794
func (es Errors) Error() string {
	if len(es) == 0 {
		return ""
	}

	keys := []string{}
	for key := range es {
		keys = append(keys, key)
	}
	sort.Strings(keys)

	s := ""
	for i, key := range keys {
		if i > 0 {
			s += "; "
		}
		if errs, ok := es[key].(Errors); ok {
			s += fmt.Sprintf("%v: (%v)", key, errs)
		} else {
			s += fmt.Sprintf("%v: %v", key, es[key].Error())
		}
	}
	return s + "."
}
705656
func (m *MultiError) Error() string {
	var s string
	var n int
	for _, err := range *m {
		if err != nil {
			if n == 0 {
				s = err.Error()
			}
			n++
		}
	}
	switch n {
	case 0:
		return ""
	case 1:
		return s
	case 2:
		return s + " and 1 other error"
	}
	return fmt.Sprintf("%s (and %d other errors)", s, n-1)
}
856481
func Errorf(level string, format string, args ...interface{}) {
	ErrorWithStackSkip(level, fmt.Errorf(format, args...), 1)
}
157531
func Errorf(format string, args ...interface{}) error {
	return &fundamental{
		msg:   fmt.Sprintf(format, args...),
		stack: callers(),
	}
}
545961
func InvalidFormatError(ctx, target string, format Format, formatError error) error {
	msg := fmt.Sprintf("%s must be formatted as a %s but got value %#v, %s", ctx, format, target, formatError.Error())
	return ErrInvalidRequest(msg, "attribute", ctx, "value", target, "expected", format, "error", formatError.Error())
}
90207
func Format(value interface{}) string {
	if value == nil {
		return "nil"
	}

	t := reflect.TypeOf(value)
	formatter := formatters[t.Kind().String()]
	if formatter == nil {
		formatter = formatters[t.String()]
	}

	if formatter == nil {
		if _, ok := t.MethodByName("Error"); ok == true {
			return formatString(value.(error).Error())
		} else {
			return formatString(fmt.Sprintf("%+v", value))
		}
	}

	return formatter(value)
}
815366
func Error(format string, v ...interface{}) {
	log.Error(fmt.Sprintf(format, v...))
}
506464
func Errorf(c codes.Code, format string, a ...interface{}) error {
	return Error(c, fmt.Sprintf(format, a...))
}
692173
func (errs Errors) Error() string {
	if len(errs) == 0 {
		return ""
	}
	if len(errs) == 1 {
		return errs[0].Error()
	}

	errors := []string{fmt.Sprint("Multiple errors occurred:")}
	for _, err := range errs {
		errors = append(errors, err.Error())
	}
	return strings.Join(errors, " - ")
}
1250541
func (ec *ErrorCollection) Error() string {
	if ec.Formatter == nil {
		return ""
	}

	ec.lock.RLock()
	defer ec.lock.RUnlock()
	str := ""
	for i, err := range ec.Errors {
		if ec.Formatter != nil {
			ec.Formatter(i, err, &str)
		}
	}
	return str
}
326099
func (l *Logger) Errorf(format string, v ...interface{}) {
	if l.Level >= ErrorLevel {
		l.Logger.Print(ErrorLevel.String() + fmt.Sprintf(format, v...))
	}
}
700214
func (c *Client) FormatError(e ErrEntry) string {
	return fmt.Sprintf("%d %s [%s] %s request-%d retry-%d error: %s\n",
		e.Time.Unix(), e.Method, e.Verb, e.URL, e.Request, e.Retry, e.Err)
}