Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cause ¶
Cause first checks for `Unwrap` returning the result if available, otherwise returns the result of `Cause`. If neither are available returns nil.
This supports both Go 1.13+ style `UnWrap` and pkg.errors style `Cause` chaining.
func MarshalStack ¶
MarshalStack is a helper to extract the stack trace from an error and make it available as an easily marshalled object (array of file/line/func).
Types ¶
type Frame ¶
Frame is a simple view of the call stack frame.
func ExtractStackFrame ¶
ExtractStackFrame extracts an embedded array of stack pointers and converts to array of Frames.
func ExtractStackFrameStop ¶
ExtractStackFrameStop works the same as ExtractStackFrame, but allows defining a stop function for the stack. Useful for filtering out stack elements that are mostly redundant and simplifying logging and review.