Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The maximum depth in ErrorWithStacks.Stacks. // The last line is set to "..." if some call stacks are ignored. // Only set this if some very deep callstack can happen, e.g. deep recursive calling. MaxStackDepth int = math.MaxInt32 )
Functions ¶
func NewWithStacks ¶
WithStacks returns a *ErrorWithStacks error with the message and stacks set.
func WithStacks ¶
WithStacks returns a *ErrorWithStacks error with stacks set. If err is nil, a nil is returned. If err has been a *ErrorWithStacks, it is directly returned.
func WithStacksAndMessage ¶
WithStacksAndMessage returns a *ErrorWithStacks error with stacks and message set. If err is nil, a nil is returned. If err has been a *ErrorWithStacks, the corresponding call stack line is appended with the message.
Types ¶
type ErrorWithStacks ¶
ErrorWithStacks is a struct containing the original error and the call stacks.
func (*ErrorWithStacks) Error ¶
func (e *ErrorWithStacks) Error() string
Error implements the error interface.
Click to show internal directories.
Click to hide internal directories.