convertPkgStack converts a StackTrace from github.com/pkg/errors to a Stacktrace in github.com/getsentry/sentry-go.
(st errbase.StackTrace)
| 72 | // convertPkgStack converts a StackTrace from github.com/pkg/errors |
| 73 | // to a Stacktrace in github.com/getsentry/sentry-go. |
| 74 | func convertPkgStack(st errbase.StackTrace) *ReportableStackTrace { |
| 75 | // If there are no frames, the entire stacktrace is nil. |
| 76 | if len(st) == 0 { |
| 77 | return nil |
| 78 | } |
| 79 | |
| 80 | // Note: the stack trace logic changed between go 1.11 and 1.12. |
| 81 | // Trying to analyze the frame PCs point-wise will cause |
| 82 | // the output to change between the go versions. |
| 83 | return parsePrintedStack(fmt.Sprintf("%+v", st)) |
| 84 | } |
| 85 | |
| 86 | // trimPath is a copy of the same function in package sentry-go. |
| 87 | func trimPath(filename string) string { |
no test coverage detected
searching dependent graphs…