Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImpossibleError ¶
func ImpossibleError(err error)
ImpossibleError panics if err is not nil. It is used to document errors that are thought to be impossible without ignoring them if they actually happen.
Types ¶
type StackTrace ¶
type StackTrace []uintptr
StackTrace represents the function call stack, with the last function to be called first, followed by the function that called it, and so on.
func Callers ¶
func Callers(skip int) StackTrace
Callers is a wrapper for runtime.Callers that automatically allocates a large enough slice to fit the entire stack trace. A skip value of 0 starts the trace with Callers, a skip value of 1 starts the trace with the caller of Callers, and so on.
func (StackTrace) AppendTo ¶
func (s StackTrace) AppendTo(buf []byte) []byte
AppendTo appends a textual representation of the stack trace to the end of the byte slice.
func (StackTrace) StackTrace ¶
func (s StackTrace) StackTrace() errors.StackTrace
StackTrace implements stackTrace from github.com/pkg/errors.