// SetError sets the error returned from the current operation
173318
func (p *InProgress) SetError(err error) {
	p.locker.Lock()
	defer p.locker.Unlock()
	p.running = false
	p.err = err
}
838601
func (s *ImportFindingsError) SetErrorCode(v string) *ImportFindingsError {
	s.ErrorCode = &v
	return s
}
940862
func (s *BatchItemError) SetErrorCode(v string) *BatchItemError {
	s.ErrorCode = &v
	return s
}
602520
func (s *FailedServiceActionAssociation) SetErrorCode(v string) *FailedServiceActionAssociation {
	s.ErrorCode = &v
	return s
}
235669
func (s *FleetError) SetErrorCode(v string) *FleetError {
	s.ErrorCode = &v
	return s
}
1339859
func (s *Wrapper) SetReadError(err error) {
	s.Lock()
	defer s.Unlock()
	s.readErr = err
}
30
func (s *TaskFailedEventDetails) SetError(v string) *TaskFailedEventDetails {
	s.Error = &v
	return s
}
507729
func (fs *errorFS) SetError(t reflect.Type, err syscall.Errno) {
	fs.mu.Lock()
	defer fs.mu.Unlock()

	fs.errors[t] = err
}
607616
func (s *GetServiceLastAccessedDetailsOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsOutput {
	s.Error = v
	return s
}
526231
func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
	s.Errors = v
	return s
}
732704
func (s *BatchModifyClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchModifyClusterSnapshotsOutput {
	s.Errors = v
	return s
}
736324
func (r *Response) SetError(err error) *Response {
	r.Error = err
	return r
}
813604
func (j *Job) setError(err error) error {
	j.err = err
	t := newTransaction()
	t.setJobField(j, "error", j.err.Error())
	if err := t.exec(); err != nil {
		return err
	}
	return nil
}
487131
func (s *BatchDeleteImportDataOutput) SetErrors(v []*BatchDeleteImportDataError) *BatchDeleteImportDataOutput {
	s.Errors = v
	return s
}
71469
func (s *LambdaFunctionFailedEventDetails) SetError(v string) *LambdaFunctionFailedEventDetails {
	s.Error = &v
	return s
}
961271
func (r *RestartTracker) SetStartError(err error) *RestartTracker {
	r.lock.Lock()
	defer r.lock.Unlock()
	r.startErr = err
	r.failure = true
	return r
}
892572
func (s *stateTracker) setError(err error) {
	s.mut.Lock()
	defer s.mut.Unlock()

	eventData := map[string]interface{}{
		"folder": s.folderID,
		"from":   s.current.String(),
	}

	if err != nil {
		eventData["error"] = err.Error()
		s.current = FolderError
	} else {
		s.current = FolderIdle
	}

	eventData["to"] = s.current.String()

	if !s.changed.IsZero() {
		eventData["duration"] = time.Since(s.changed).Seconds()
	}

	s.err = err
	s.changed = time.Now()

	events.Default.Log(events.StateChanged, eventData)
}