errors

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecoverPanic  = errors.New("recover panic")
	ErrInvalid       = os.ErrInvalid    // "invalid argument"
	ErrPermission    = os.ErrPermission // "permission denied"
	ErrExist         = errors.New("already exists")
	ErrNotExist      = errors.New("not exist")
	ErrClosed        = errors.New("already closed")
	ErrNotSupport    = errors.New("not support")
	ErrUnimplemented = errors.New("not implemented")

	ErrOutOfRange = errors.New("out of range")
	ErrNotFound   = errors.New("not found")
)

Functions

func Recover added in v0.2.1

func Recover() error

func Wrap added in v0.2.1

func Wrap(e error, v any) error

Types

type Errors added in v0.2.5

type Errors[K comparable] map[K]error

func (Errors[K]) As added in v0.2.5

func (x Errors[K]) As(target any) bool

func (Errors[K]) Error added in v0.2.5

func (x Errors[K]) Error() string

func (Errors[K]) Is added in v0.2.5

func (x Errors[K]) Is(target error) bool

Jump to

Keyboard shortcuts

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