// NegatedFailureMessage returns the message when c matched a call and
// shouldn't have.
342690
func (c *Called) NegatedFailureMessage(actual interface{}) (message string) {
	msg := fmt.Sprintf("Expected %#v not to be called", actual)
	if len(c.matched[0]) == 0 {
		return msg
	}
	return fmt.Sprintf("%s with args (%s)", msg, joinInter(c.matched[0], ", "))
}
371418
func WithMessagef(e error, format string, a ...interface{}) Error {
	if e == nil {
		return nil
	}
	return WrapSkipping(e, 1).WithMessagef(format, a...)
}
653622
func negatedSelector(a Selector) Selector {
	return func(n *html.Node) bool {
		if n.Type != html.ElementNode {
			return false
		}
		return !a(n)
	}
}
329078
func (this *Future) OnFailure(callback func(v interface{})) *Future {
	this.addCallback(callback, CALLBACK_FAIL)
	return this
}
484745
func (s *RemoveTargetsResultEntry) SetErrorMessage(v string) *RemoveTargetsResultEntry {
	s.ErrorMessage = &v
	return s
}
369305
func messageForError(err error) string {
	msg, ok := StandardErrorMessage(err)
	if !ok {
		msg = err.Error()
	}
	return msg
}
1347368
func (r *Request) ErrorMessage(rcode int) *dns.Msg {
	m := new(dns.Msg)
	m.SetRcode(r.Req, rcode)
	return m
}
712162
func (c *Client) VerifyMessage(address btcutil.Address, signature, message string) (bool, error) {
	return c.VerifyMessageAsync(address, signature, message).Receive()
}
1172152
func (s *FailedServiceActionAssociation) SetErrorMessage(v string) *FailedServiceActionAssociation {
	s.ErrorMessage = &v
	return s
}
888714
func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery {
	q.failOnUnsupportedField = &fail
	return q
}
574029
func (s *Suite) Not(result *Assertion, messages ...string) *Assertion {
	assertion := s.setup(fmt.Sprintf("Expected assertion to fail"), messages)
	if result.Passed {
		assertion.fail()
	} else {
		result.Passed = true
		assertion.testFunc.resetLastError()
	}
	return assertion
}
1295881
func (s *FailedRemediationBatch) SetFailureMessage(v string) *FailedRemediationBatch {
	s.FailureMessage = &v
	return s
}
787034
func WithMessage(e error, msg string) Error {
	if e == nil {
		return nil
	}
	return WrapSkipping(e, 1).WithValue(message, msg)
}
357112
func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	content := []labeledContent{
		{"Error Trace", strings.Join(CallerInfo(), "\n\t\t\t")},
		{"Error", failureMessage},
	}

	// Add test name if the Go version supports it
	if n, ok := t.(interface {
		Name() string
	}); ok {
		content = append(content, labeledContent{"Test", n.Name()})
	}

	message := messageFromMsgAndArgs(msgAndArgs...)
	if len(message) > 0 {
		content = append(content, labeledContent{"Messages", message})
	}

	t.Errorf("\n%s", ""+labeledOutput(content...))

	return false
}
6361
func (r *RelayMessageOption) RelayMessage() (*RelayMessage, error) {
	rm := new(RelayMessage)
	err := rm.UnmarshalBinary(*r)
	if err != nil {
		return nil, err
	}

	return rm, nil
}
817071
func checkMessage(m Message) error {
	// NB: All non-nil errors returned from this function *must* be of type
	// OpError in order to maintain the appropriate contract with callers of
	// this package.

	const success = 0

	// Per libnl documentation, only messages that indicate type error can
	// contain error codes:
	// https://www.infradead.org/~tgr/libnl/doc/core.html#core_errmsg.
	//
	// However, at one point, this package checked both done and error for
	// error codes.  Because there was no issue associated with the change,
	// it is unknown whether this change was correct or not.  If you run into
	// a problem with your application because of this change, please file
	// an issue.
	if m.Header.Type != Error {
		return nil
	}

	if len(m.Data) < 4 {
		return newOpError("receive", errShortErrorMessage)
	}

	if c := nlenc.Int32(m.Data[0:4]); c != success {
		// Error code is a negative integer, convert it into an OS-specific raw
		// system call error, but do not wrap with os.NewSyscallError to signify
		// that this error was produced by a netlink message; not a system call.
		return newOpError("receive", newError(-1*int(c)))
	}

	return nil
}
969934
func WrapWithMessage(err error, message interface{}, args ...interface{}) Error {
	trace := wrapWithDepth(err, 3)
	if trace != nil {
		trace.AddUserMessage(message, args...)
	}
	return trace
}