// Fail implements Assertion.
5461
func (a *assertion) Fail(msgs ...string) bool {
	return a.failer.Fail(Fail, nil, nil, msgs...)
}
923595
func Assert(t crossdock.T, tt TT, desc string, got interface{}, err error) {
	checks := crossdock.Checks(t)
	assert := crossdock.Assert(t)

	if tt.WantError != nil || tt.WantErrorLike != "" {
		if !checks.Error(err, "%v: expected failure but got: %v", desc, got) {
			return
		}
		if tt.WantError != nil {
			assert.Equal(tt.WantError, err, "%v: server returned error: %v", desc, err)
		}
		if tt.WantErrorLike != "" {
			assert.Contains(err.Error(), tt.WantErrorLike, "%v: server returned error: %v", desc, err)
		}
	} else {
		if !checks.NoError(err, "%v: call failed", desc) {
			return
		}
		if tt.Want != nil {
			assert.Equal(tt.Want, got, "%v: server returned: %v", desc, got)
		}
	}
}
503145
func (f FailTemporaryChannelFailure) Error() string {
	if f.Update == nil {
		return f.Code().String()
	}

	return fmt.Sprintf("TemporaryChannelFailure(update=%v)",
		spew.Sdump(f.Update))
}
306220
func (b *Breaker) Failure(event Event, err error) bool {
	b.mu.Lock()
	defer b.mu.Unlock()

	b.recent++
	b.last = time.Now().UTC()
	return false // never drop events.
}
245368
func (t UserPagination) Failure(err error) error {
	if t.Done(err) {
		return nil
	}

	return err
}
543622
func Fail(injected error) Rule {
	return func(ctx context.Context, e *scheduler.Event, err error, ch Chain) (context.Context, *scheduler.Event, error) {
		return ch(ctx, e, Error2(err, injected))
	}
}
782333
func (a *assertion) ErrorMatch(obtained error, regex string, msgs ...string) bool {
	if obtained == nil {
		return a.failer.Fail(ErrorMatch, nil, regex, "error is nil")
	}
	matches, err := a.IsMatching(obtained.Error(), regex)
	if err != nil {
		return a.failer.Fail(ErrorMatch, obtained, regex, "can't compile regex: "+err.Error())
	}
	if !matches {
		return a.failer.Fail(ErrorMatch, obtained, regex, msgs...)
	}
	return true
}
28874
func (r *SyncResult) Fail(err error, msg string) {
	r.Error, r.Message = err, msg
}
1206750
func (v *Validation) Error(message string, args ...interface{}) *ValidationResult {
	result := v.ValidationResult(false).Message(message, args...)
	v.Errors = append(v.Errors, result.Error)
	return result
}
560333
func (g *deploymentGroup) Failed() bool {
	failed := false

	for _, deployment := range g.deployments {
		failed = failed || (deployment.status.code == FAIL) || (deployment.status.code == TIMEOUT)
	}

	return failed
}
1145548
func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	FailNow(a.t, failureMessage, msgAndArgs...)
}
1320488
func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	Fail(t, failureMessage, msgAndArgs...)

	// We cannot extend TestingT with FailNow() and
	// maintain backwards compatibility, so we fallback
	// to panicking when FailNow is not available in
	// TestingT.
	// See issue #263

	if t, ok := t.(failNower); ok {
		t.FailNow()
	} else {
		panic("test failed and t is missing `FailNow()`")
	}
	return false
}
1373300
func (f *DedupSQSFilter) Failed(msg *sqs.Message) {
	msgBody := aws.StringValue(msg.Body)
	_ = f.cache.Unset(msgBody)
}
101521
func (c *requestContext) fail(code int, msg string, args ...interface{}) {
	body := fmt.Sprintf(msg, args...)
	logging.Errorf(c.Context, "HTTP %d: %s", code, body)
	http.Error(c.Writer, body, code)
}
1033291
func (cl *Call) Error(arguments ...interface{}) {
	cl.scope.log(cl.entry, fmt.Sprintln(arguments...))
	cl.scope.t.Fail()
}
429568
func Errorf(t TestingT, err error, msg string, args ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.Errorf(t, err, msg, args...) {
		return
	}
	t.FailNow()
}
1082696
func (rs *retryingSink) failure() {
	rs.failures.recent++
	rs.failures.last = time.Now().UTC()
}