exceptions

package
v0.6.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: GPL-2.0 Imports: 10 Imported by: 632

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(err error, other error, block func(error) error) error

func Cast added in v0.2.1

func Cast[T any](err error) (T, bool)

func Cause

func Cause(cause error, message ...any) error

func Errors

func Errors(errors ...error) error

func Expand

func Expand(err error) []error

func ExpandAll

func ExpandAll(errs []error) []error

func Extend

func Extend(cause error, message ...any) error

func IsCanceled

func IsCanceled(err error) bool

func IsClosed

func IsClosed(err error) bool

func IsClosedOrCanceled

func IsClosedOrCanceled(err error) bool

func IsMulti

func IsMulti(err error, targetList ...error) bool

func IsTimeout

func IsTimeout(err error) bool

func New

func New(message ...any) error

func Unwrap

func Unwrap(err error) error

Types

type Handler deprecated

type Handler interface {
	NewError(ctx context.Context, err error)
}

Deprecated: wtf is this?

type HasInnerError

type HasInnerError interface {
	Unwrap() error
}

type MultiError

type MultiError interface {
	Unwrap() []error
}

type TimeoutError

type TimeoutError interface {
	Timeout() bool
}

Jump to

Keyboard shortcuts

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