errors

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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 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 ErrAlreadyExist

type ErrAlreadyExist struct {
	*Bubble
}

type ErrFailure

type ErrFailure struct {
	*Bubble
}

type ErrInternal

type ErrInternal struct {
	*Bubble
}

type ErrInvalidValue

type ErrInvalidValue struct {
	*Bubble
}

type ErrNotExist

type ErrNotExist struct {
	*Bubble
}

type Meta

type Meta = map[string]any

Jump to

Keyboard shortcuts

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