MCPcopy Create free account
hub / github.com/chain/Core / Stack

Function Stack

errors/stack.go:24–29  ·  view source on GitHub ↗

Stack returns the stack trace of an error. The error must contain the stack trace, or wrap an error that has a stack trace,

(err error)

Source from the content-addressed store, hash-verified

22// Stack returns the stack trace of an error. The error must contain the stack
23// trace, or wrap an error that has a stack trace,
24func Stack(err error) []StackFrame {
25 if wErr, ok := err.(wrapperError); ok {
26 return wErr.stack
27 }
28 return nil
29}
30
31// getStack is a formatting wrapper around runtime.Callers. It returns a stack
32// trace in the form of a StackFrame slice.

Callers 1

TestWrapFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWrapFunction · 0.68