xerror

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(err error, target error, others ...error) bool

func Iss

func Iss(err error, targets ...error) bool

func Join added in v0.5.0

func Join(err error, other error) error

func JoinByFormat added in v0.5.0

func JoinByFormat(err error, other error, format string) error

Types

type ErrorWraperConfigs

type ErrorWraperConfigs struct {
	// contains filtered or unexported fields
}

func NewWrapperConfigs

func NewWrapperConfigs(defaultErr RichError, goodErrors ...error) *ErrorWraperConfigs

func (*ErrorWraperConfigs) Event

func (config *ErrorWraperConfigs) Event(err error, event string, attributes ...any) *errorWrapper

type RichError

type RichError struct {
	// contains filtered or unexported fields
}

func Enrich

func Enrich(code error, description string, format ...any) RichError

func (RichError) Attributes

func (err RichError) Attributes() []any

func (RichError) Code

func (err RichError) Code() error

func (RichError) Description

func (err RichError) Description() string

func (RichError) Detail

func (err RichError) Detail() error

func (RichError) Error

func (err RichError) Error() string

func (RichError) Event

func (err RichError) Event() string

func (RichError) Hide

func (err RichError) Hide(detail error, event string, attributes ...any) RichError

func (RichError) Reduce

func (err RichError) Reduce() error

func (RichError) Unwrap

func (err RichError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL