GetOneLineSource extracts the file/line/function information of the topmost caller in the innermost recorded stack trace. The filename is simplified to remove the path prefix. This is used e.g. to populate the "source" field in PostgreSQL errors in CockroachDB.
(err error)
| 48 | // This is used e.g. to populate the "source" field in |
| 49 | // PostgreSQL errors in CockroachDB. |
| 50 | func GetOneLineSource(err error) (file string, line int, fn string, ok bool) { |
| 51 | return withstack.GetOneLineSource(err) |
| 52 | } |
| 53 | |
| 54 | // GetReportableStackTrace extracts a stack trace embedded in the |
| 55 | // given error in the format suitable for Sentry reporting. |
nothing calls this directly
no test coverage detected
searching dependent graphs…