exceptions

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: GPL-2.0 Imports: 10 Imported by: 449

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

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

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