Documentation
¶
Index ¶
- func As(err error, target any) bool
- func Dump(e error) string
- func Errorf(fmtstring string, args ...any) error
- func Is(err, target error) bool
- func IsPear(e error) bool
- func Join(errs ...error) error
- func NicePanic(w io.Writer)
- type Error
- type ErrorWithStackFrame
- type MultiError
- type Multipear
- func (m *Multipear) As(target any) bool
- func (m *Multipear) Dump() string
- func (m *Multipear) Error() string
- func (m *Multipear) Is(target error) bool
- func (m *Multipear) Trace() []ErrorWithStackFrame
- func (m *Multipear) Unwind() []*Pear
- func (m *Multipear) Unwrap() []error
- func (m *Multipear) Wrap(e error)
- type Pear
- type SingleError
- type StackFrame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error interface { Error() string Wrap(error) Unwind() []*Pear Trace() []ErrorWithStackFrame Dump() string }
an Error is an error with a stack trace.
type ErrorWithStackFrame ¶
type ErrorWithStackFrame struct { Message string `json:"msg"` *StackFrame }
ErrorWithStackFrame is an error with a stack frame
type MultiError ¶
a MultiError is an error made up of a list of errors
type Multipear ¶
type Multipear struct {
// contains filtered or unexported fields
}
Multipear is here to support errors.Join
func NewMultiPear ¶
func (*Multipear) Trace ¶
func (m *Multipear) Trace() []ErrorWithStackFrame
type Pear ¶
type Pear struct {
// contains filtered or unexported fields
}
Pear is a perfect error
func (*Pear) Stack ¶
func (p *Pear) Stack(offset int) *StackFrame
Stack produces (or just returns) a StackFrame for a *Pear
func (*Pear) Trace ¶
func (p *Pear) Trace() []ErrorWithStackFrame
Trace returns all the [StackFrame]s from the *Pear, down through its descendants
type SingleError ¶
type SingleError interface { Error Unwrap() error Stack(int) *StackFrame }
a SingleError is the most common type of error
Click to show internal directories.
Click to hide internal directories.