(err error)
| 2259 | } |
| 2260 | |
| 2261 | func unwrapAll(err error) (errs []error) { |
| 2262 | errs = append(errs, err) |
| 2263 | switch x := err.(type) { |
| 2264 | case interface{ Unwrap() error }: |
| 2265 | err = x.Unwrap() |
| 2266 | if err == nil { |
| 2267 | return |
| 2268 | } |
| 2269 | errs = append(errs, unwrapAll(err)...) |
| 2270 | case interface{ Unwrap() []error }: |
| 2271 | for _, err := range x.Unwrap() { |
| 2272 | errs = append(errs, unwrapAll(err)...) |
| 2273 | } |
| 2274 | } |
| 2275 | return |
| 2276 | } |
| 2277 | |
| 2278 | func buildErrorChainString(err error, withType bool) string { |
| 2279 | if err == nil { |
no outgoing calls
no test coverage detected