errors

package
v0.0.1-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(err error, target any) bool

func BubbleUp

func BubbleUp(who error, where string) error

func Default

func Default() error

func Is

func Is(err, target error) bool

func Join

func Join(errs ...error) error

func NewAlreadyExist

func NewAlreadyExist(bubble *Bubble) error

func NewFailure

func NewFailure(bubble *Bubble) error

func NewInternal

func NewInternal(bubble *Bubble) error

func NewInvalidValue

func NewInvalidValue(bubble *Bubble) error

func NewNotExist

func NewNotExist(bubble *Bubble) error

func Panic

func Panic(what, where string)

Types

type AlreadyExist

type AlreadyExist struct {
	*Bubble
}

type Bubble

type Bubble struct {
	When        time.Time
	Where, What string
	Why         map[string]any
	Who         error
}

func NewBubble

func NewBubble(where, what string, why Meta, who error) *Bubble

func (*Bubble) Error

func (err *Bubble) Error() string

type Failure

type Failure struct {
	*Bubble
}

type Internal

type Internal struct {
	*Bubble
}

type InvalidValue

type InvalidValue struct {
	*Bubble
}

type Meta

type Meta = map[string]any

type NotExist

type NotExist struct {
	*Bubble
}

Jump to

Keyboard shortcuts

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