// SetError finds a type that implements a error interface and set it to err.
766827
func setError(retvals []reflect.Value, err error) {
	if err == nil {
		return
	}
	var i int
	var retval reflect.Value
	for i, retval = range retvals {
		if reflect.TypeOf(err).AssignableTo(retval.Type()) {
			if retval.CanSet() && retval.IsNil() {
				retval.Set(reflect.ValueOf(err))
			}
		}
	}
	if i == len(retvals) {
		panic("can't assign an error to none of the returned values")
	}
}
455535
func (s *RenderUiTemplateOutput) SetErrors(v []*RenderingError) *RenderUiTemplateOutput {
	s.Errors = v
	return s
}
215719
func (s *TaskSubmitFailedEventDetails) SetError(v string) *TaskSubmitFailedEventDetails {
	s.Error = &v
	return s
}
179063
func (s *TaskTimedOutEventDetails) SetError(v string) *TaskTimedOutEventDetails {
	s.Error = &v
	return s
}
1351651
func (s *ExecutionTimedOutEventDetails) SetError(v string) *ExecutionTimedOutEventDetails {
	s.Error = &v
	return s
}
485306
func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput {
	s.Error = v
	return s
}
834949
func (s *ExecutionAbortedEventDetails) SetError(v string) *ExecutionAbortedEventDetails {
	s.Error = &v
	return s
}
407926
func (ctx *containerProfileContext) SetError(idx int, err error) {
	ctx.result.Results[idx].Error = common.ServerError(err)
}
940862
func (s *BatchItemError) SetErrorCode(v string) *BatchItemError {
	s.ErrorCode = &v
	return s
}
71469
func (s *LambdaFunctionFailedEventDetails) SetError(v string) *LambdaFunctionFailedEventDetails {
	s.Error = &v
	return s
}
466062
func (s *PutPipelineDefinitionOutput) SetErrored(v bool) *PutPipelineDefinitionOutput {
	s.Errored = &v
	return s
}
123394
func (self *StateDB) setError(err error) {
	if self.dbErr == nil {
		self.dbErr = err
	}
}
199695
func (s *BatchDeleteTableOutput) SetErrors(v []*TableError) *BatchDeleteTableOutput {
	s.Errors = v
	return s
}
1058667
func (s *AccountModification) SetErrorCode(v string) *AccountModification {
	s.ErrorCode = &v
	return s
}
1339859
func (s *Wrapper) SetReadError(err error) {
	s.Lock()
	defer s.Unlock()
	s.readErr = err
}
1282106
func (c Condition) SetError(err error) {
	if err != nil {
		cond := amqp.MakeError(err)
		c.SetName(cond.Name)
		c.SetDescription(cond.Description)
	}
}
1342310
func (s *BatchCreatePartitionOutput) SetErrors(v []*PartitionError) *BatchCreatePartitionOutput {
	s.Errors = v
	return s
}