Stack returns the callstack formatted the same way that go does in runtime/debug.Stack()
()
| 160 | // Stack returns the callstack formatted the same way that go does |
| 161 | // in runtime/debug.Stack() |
| 162 | func (err *Error) Stack() []byte { |
| 163 | buf := bytes.Buffer{} |
| 164 | |
| 165 | for _, frame := range err.StackFrames() { |
| 166 | buf.WriteString(frame.String()) |
| 167 | } |
| 168 | |
| 169 | return buf.Bytes() |
| 170 | } |
| 171 | |
| 172 | // Callers satisfies the bugsnag ErrorWithCallerS() interface |
| 173 | // so that the stack can be read out. |