// SetHasError sets the HasError field's value.
546707
func (s *TraceSummary) SetHasError(v bool) *TraceSummary {
	s.HasError = &v
	return s
}
662728
func FailOnError(err error) {
	if merr, ok := err.(MultiError); ok {
		if len(merr) == 0 {
			return
		}
		fmt.Fprintf(os.Stderr, merr.Error())
		os.Exit(1)
	}
	if err != nil {
		fmt.Fprintf(os.Stderr, err.Error())
		os.Exit(1)
	}
}
88977
func (c *StorageClient) SetHeader(header *http.Header) {
	c.Client.RequestHeader = header
}
256177
func PanicOnError(err error, msg string) {
	if revErr, ok := err.(*Error); (ok && revErr != nil) || (!ok && err != nil) {
		Logger.Panicf("Abort: %s: %s %s", msg, revErr, err)
	}
}
146079
func (c *NetworkClient) SetHeader(header *http.Header) {
	c.Client.RequestHeader = header
}
1140832
func (m MultiError) ToError() error {
	if len(m.Errors) == 0 {
		return nil
	}

	errStrings := []string{}
	for _, err := range m.Errors {
		errStrings = append(errStrings, err.Error())
	}
	return errors.New(strings.Join(errStrings, "\n"))
}
326771
func (s *ModifyHsmOutput) SetHsmArn(v string) *ModifyHsmOutput {
	s.HsmArn = &v
	return s
}
1314213
func (e *Error) ToError() error {
	if e == nil {
		return nil
	}

	code := codes.Code(e.GrpcCode)
	err := status.Errorf(code, "%s", e.Msg)
	if e.Transient || grpcutil.IsTransientCode(code) {
		err = transient.Tag.Apply(err)
	}
	return err
}
754576
func (s *CreateChannelOutput) SetHlsIngest(v *HlsIngest) *CreateChannelOutput {
	s.HlsIngest = v
	return s
}
571820
func ErrorHandler(h utils.ErrorHandler) optSetter {
	return func(b *Buffer) error {
		b.errHandler = h
		return nil
	}
}
740013
func AsResponseError(err error) *ResponseError {
	if err == nil {
		return nil
	}
	message := err.Error()
	var code string
	switch errors.Cause(err) {
	case lease.ErrInvalid:
		code = "invalid"
	case globalclock.ErrConcurrentUpdate:
		code = "concurrent-update"
	default:
		code = "error"
	}
	return &ResponseError{
		Message: message,
		Code:    code,
	}
}
1039285
func (_class PoolClass) SetHaHostFailuresToTolerate(sessionID SessionRef, self PoolRef, value int) (_err error) {
	_method := "pool.set_ha_host_failures_to_tolerate"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPoolRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_valueArg, _err := convertIntToXen(fmt.Sprintf("%s(%s)", _method, "value"), value)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _valueArg)
	return
}
1285955
func (r *Result) MergeAsErrors(others ...*Result) *Result {
	for _, other := range others {
		if other != nil {
			r.resetCaches()
			r.AddErrors(other.Errors...)
			r.AddErrors(other.Warnings...)
			r.MatchCount += other.MatchCount
		}
	}
	return r
}
183711
func (ctx *Context) SetHeader(hdr string, val string, unique bool) {
	if unique {
		ctx.Header().Set(hdr, val)
	} else {
		ctx.Header().Add(hdr, val)
	}
}
295343
func (c *Context) SetHeader(key, value string) {
	c.response.Header().Set(key, value)
}
959682
func ErrorHandler(cb ErrHandler) Option {
	return func(o *Options) error {
		o.AsyncErrorCB = cb
		return nil
	}
}
450066
func (s *session) rollbackOnError(ctx context.Context) {
	if !s.sessionVars.InTxn() {
		s.RollbackTxn(ctx)
	}
}