exceptions

package
v0.3.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 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

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