(err error)
| 54 | } |
| 55 | |
| 56 | func getDetails(err error) []string { |
| 57 | if sd, ok := err.(SafeDetailer); ok { |
| 58 | return sd.SafeDetails() |
| 59 | } |
| 60 | // For convenience, we also know how to extract stack traces |
| 61 | // in the style of github.com/pkg/errors. |
| 62 | if st, ok := err.(interface{ StackTrace() pkgErr.StackTrace }); ok { |
| 63 | return []string{fmt.Sprintf("%+v", st.StackTrace())} |
| 64 | } |
| 65 | return nil |
| 66 | } |
| 67 | |
| 68 | // SafeDetailPayload captures the safe strings for one |
| 69 | // level of wrapping. |
no test coverage detected
searching dependent graphs…