MCPcopy Create free account
hub / github.com/stretchr/testify / NotErrorAs

Method NotErrorAs

assert/assertion_forward.go:1239–1244  ·  view source on GitHub ↗

NotErrorAs asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.

(err error, target interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1237// NotErrorAs asserts that none of the errors in err's chain matches target,
1238// but if so, sets target to that error value.
1239func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool {
1240 if h, ok := a.t.(tHelper); ok {
1241 h.Helper()
1242 }
1243 return NotErrorAs(a.t, err, target, msgAndArgs...)
1244}
1245
1246// NotErrorAsf asserts that none of the errors in err's chain matches target,
1247// but if so, sets target to that error value.

Callers

nothing calls this directly

Calls 2

NotErrorAsFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected