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

Function buildErrorChainString

assert/assertions.go:2172–2184  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

2170}
2171
2172func buildErrorChainString(err error) string {
2173 if err == nil {
2174 return ""
2175 }
2176
2177 e := errors.Unwrap(err)
2178 chain := fmt.Sprintf("%q", err.Error())
2179 for e != nil {
2180 chain += fmt.Sprintf("\n\t%q", e.Error())
2181 e = errors.Unwrap(e)
2182 }
2183 return chain
2184}

Callers 4

ErrorIsFunction · 0.85
NotErrorIsFunction · 0.85
ErrorAsFunction · 0.85
NotErrorAsFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected