Documentation
¶
Index ¶
- func Errorf(format string, args ...any) error
- func MakeErrorTreeOrErr(err error, frames ...Frame) error
- func Wrap(err error) error
- func WrapSkip(skip int, err error) error
- func Wrapf(err error, format string, args ...any) error
- type ErrorAndFrame
- type ErrorStackTracer
- type ErrorTree
- type ErrorsAndFramesGetter
- type Frame
- func (frame Frame) Errorf(format string, args ...any) error
- func (frame Frame) FileNameLine() string
- func (frame Frame) IsEmpty() bool
- func (frame Frame) String() string
- func (frame Frame) StringLogLine() string
- func (frame Frame) StringNoFunctionName() string
- func (frame Frame) Wrap(err error) error
- func (frame Frame) Wrapf(err error, format string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorAndFrame ¶
func (ErrorAndFrame) Error ¶
func (err ErrorAndFrame) Error() string
func (ErrorAndFrame) IsEmpty ¶
func (err ErrorAndFrame) IsEmpty() bool
func (ErrorAndFrame) Unwrap ¶
func (err ErrorAndFrame) Unwrap() error
type ErrorTree ¶
type ErrorTree struct {
Root error
Descendents errorsAndFrames
}
func (*ErrorTree) GetErrorsAndFrames ¶
func (tree *ErrorTree) GetErrorsAndFrames() []ErrorAndFrame
type ErrorsAndFramesGetter ¶
type ErrorsAndFramesGetter interface {
GetErrorRoot() error
GetErrorsAndFrames() []ErrorAndFrame
}
type Frame ¶
type Frame struct {
Package string
Function string
Filename string
RelFilename string
Line int
Prefix string
// contains filtered or unexported fields
}
func MakeFrameFromRuntimeFrame ¶
func (Frame) Wrap ¶
If the frame is non-zero, return a wrapped error. Otherwise return the input error unwrapped.
Source Files
¶
- error_and_frame.go
- error_tree.go
- errors_and_frames.go
- frame.go
- main.go
Click to show internal directories.
Click to hide internal directories.