// managerError creates a ManagerError given a set of arguments.
486325
func managerError(c ErrorCode, desc string, err error) ManagerError {
	return ManagerError{ErrorCode: c, Description: desc, Err: err}
}
345068
func (e TxnError) Error() string {
	return fmt.Sprintf("op %d: %s", e.OpIndex, e.What)
}
380733
func createError(prinatableCmd, cmdOut string, cmdErr error) error {
	message := fmt.Sprintf("command (%s) failed", prinatableCmd)
	if len(cmdOut) > 0 {
		message += "\nout: " + cmdOut
	}
	if !errorutil.IsExitStatusError(cmdErr) {
		message += "\nerr: " + cmdErr.Error()
	}
	return errors.New(message)
}
793715
func appendError(errors []error, err error) []error {
	if err != nil {
		return append(errors, err)
	}
	return errors
}
1347482
func FatalIfError(err error, format string, args ...interface{}) {
	CommandLine.FatalIfError(err, format, args...)
}
1125511
func (g *Goon) KeyError(src interface{}) (*datastore.Key, error) {
	key, _, err := g.getStructKey(src)
	return key, err
}
1151394
func (m MultiError) Error() string {
	errs := make([]string, len(m.Errors))
	for i, err := range m.Errors {
		errs[i] = err.Error()
	}

	return strings.Join(errs, "\n")
}
691743
func (b *BuildError) Error() string {
	return fmt.Sprint(b.Message, b.Args)
}
1146466
func (m *MultiError) Error() string {
	var buf bytes.Buffer

	if len(m.Errors) == 1 {
		buf.WriteString("1 error: ")
	} else {
		fmt.Fprintf(&buf, "%d errors: ", len(m.Errors))
	}

	for i, err := range m.Errors {
		if i != 0 {
			buf.WriteString("; ")
		}

		buf.WriteString(err.Error())
	}

	return buf.String()
}
658758
func (errs *Errors) AddError(errors ...error) {
	for _, err := range errors {
		if err != nil {
			if e, ok := err.(errorsInterface); ok {
				errs.errors = append(errs.errors, e.GetErrors()...)
			} else {
				errs.errors = append(errs.errors, err)
			}
		}
	}
}
267119
func (ls *LState) ArgError(n int, message string) {
	ls.RaiseError("bad argument #%v to %v (%v)", n, ls.rawFrameFuncName(ls.currentFrame), message)
}
1280365
func (s *ShareError) SetError(v string) *ShareError {
	s.Error = &v
	return s
}
324375
func (d *Decoder) syntaxError(msg string) error {
	return &SyntaxError{Msg: msg, Line: d.line}
}
18737
func marshalError(f string, c ErrorCode, desc string, v interface{}) *MarshalError {
	e := &MarshalError{ErrorCode: c, Func: f, Description: desc}
	switch t := v.(type) {
	case []byte:
		slice := make([]byte, len(t))
		copy(slice, t)
		e.Value = slice
	default:
		e.Value = v
	}

	return e
}
930057
func (r *Request) UseError(fn context.HandlerFunc) *Request {
	r.Middleware.UseError(fn)
	return r
}
1033291
func (cl *Call) Error(arguments ...interface{}) {
	cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
	cl.scope.t.Fail()
}
1374782
func SetError(impl config.Interface, err error) {
	impl.(*memoryImpl).err = err
}