// ctxSetErr sets err in the request context, and returns the new request.
969703
func ctxSetErr(r *http.Request, err error) *http.Request {
	Logger.Info("cannot set error in context", "err", err)
	return r
}
871799
func (meta Meta) GetSetter() func(resource interface{}, metaValue *MetaValue, context *qor.Context) {
	return meta.Setter
}
397276
func (c Context) Err() error {
	if m := c.Conditions & c.Traps; m != 0 {
		return m
	}
	return nil
}
1319863
func Lsetxattr(path string, attr string, data []byte, flags int) error {
	return ErrNotSupportedPlatform
}
283444
func CtxErr(r *http.Request) error {
	val := r.Context().Value(errCtx)
	if val == nil {
		return nil
	}
	return val.(error)
}
990095
func (c *Client) SetConsumer(consumerKey string, consumerSecret string) {
	c.consumer = oauth1.NewConfig(consumerKey, consumerSecret)
	c.client = nil
}
262190
func (cr *Context) SetOperator(op Operator) {
	C.cairo_set_operator(cr.Ptr, C.cairo_operator_t(op))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
164244
func ErrorR(req *http.Request, err error, data Data) {
	ErrorC(GetRequestID(req), err, data)
}
349332
func (b *Base) SetErrorHandler(eh ErrorHandler) error {
	if eh == nil {
		return errors.New("error handler must be non-nil")
	}

	b.mutex.Lock()
	defer b.mutex.Unlock()
	b.errHandler = eh

	return nil
}
412473
func IsErr(err error, errs ...error) bool {
	for _, exactErr := range errs {
		if err == exactErr {
			return true
		}
	}
	return false
}
1015423
func (r *Reporter) AddErr(err error) bool {
	if err == nil {
		return false
	}

	if stackErr, ok := err.(StackError); ok {
		r.addStack(stackErr.Stack())
	} else {
		r.mu.Lock()
		r.wrapper = r.wrapper.AppendErr(err)
		r.mu.Unlock()
	}

	return true
}
389252
func (s *Sender) SendCtx(ctx context.Context, req *http.Request) (resp *http.Response, err error) {
	return s.ExecWithRetry(fmt.Sprintf("%s request to %s", req.Method, req.URL), func() (*http.Response, error) { return ctxhttp.Do(ctx, s.client, req) })
}
322112
func (rc *RequestConfig) SetHeader(headers H) *RequestConfig {
	if len(headers) > 0 {
		rc.Headers = headers
	}

	return rc
}
581785
func (r *ReporterSimple) ReportErr(ctx context.Context,
	_ tlf.CanonicalName, _ tlf.Type, _ ErrorModeType, err error) {
	r.lock.Lock()
	defer r.lock.Unlock()

	stack := make([]uintptr, 20)
	n := runtime.Callers(2, stack)
	re := ReportedError{
		Time:  r.clock.Now(),
		Error: err,
		Stack: stack[:n],
	}
	r.currErrorIndex++
	if r.maxErrors < 1 {
		r.errors = append(r.errors, re)
	} else {
		if r.currErrorIndex == r.maxErrors {
			r.currErrorIndex = 0
			r.filledOnce = true
		}
		r.errors[r.currErrorIndex] = re
	}

}
997042
func (d *downloader) setErr(e error) {
	d.m.Lock()
	defer d.m.Unlock()

	d.err = e
}
870399
func Ctx(ctx context.Context) *Logger {
	if l, ok := ctx.Value(ctxKey{}).(*Logger); ok {
		return l
	}
	return disabledLogger
}
1051719
func NoErr(t Tester, e error) {
	if e != nil {
		t.Fatalf(callerStrf(WithFrameWrapper(t), "expected no error but got %s", e))
	}
}