errors

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cause        = errs.Cause
	New          = errs.New
	WithStack    = errs.WithStack
	Wrap         = errs.Wrap
	Wrapf        = errs.Wrapf
	WithMessage  = errs.WithMessage
	WithMessagef = errs.WithMessagef
)

Functions

func CauseWithNil

func CauseWithNil(err error) error

CauseWithNil returns Cause of an error. If error returned by Cause is same (no Causer interface implemented), function will return nil instead

func Errors

func Errors(errs ...error) error

func IsConnectionRefused

func IsConnectionRefused(err error) bool

IsConnectionRefused returns true if the given error is caused by an "connection refused" error.

func IsConnectionReset

func IsConnectionReset(err error) bool

IsConnectionReset returns true if the given error is caused by an "connection reset by peer" error.

func IsContextCanceled

func IsContextCanceled(err error) bool

IsContextCanceled returns true if the given error is caused by a context cancelation.

func IsContextCanceledOrExpired

func IsContextCanceledOrExpired(err error) bool

IsContextCanceledOrExpired returns true if the given error is caused by a context cancelation or deadline expiration.

func IsContextDeadlineExpired

func IsContextDeadlineExpired(err error) bool

IsContextDeadlineExpired returns true if the given error is caused by a context deadline expiration.

func IsEOF

func IsEOF(err error) bool

IsEOF returns true if the given error is caused by an EOF error.

func IsReconcile

func IsReconcile(err error) bool

func IsTemporary

func IsTemporary(err error) bool

IsTemporary returns true if the given error is caused by a temporary error.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout returns true if the given error is caused by a timeout error.

func LogError

func LogError(logger logging.Logger, msg string, f func() error)

func Newf

func Newf(format string, args ...interface{}) error

func Reconcile

func Reconcile() error

func Section

func Section(cause error, format string, args ...interface{}) error

Types

type Array

type Array []error

func (Array) Error

func (a Array) Error() string

type Causer

type Causer interface {
	Cause() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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