errors

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 9 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
)

Functions

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 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 WithMessage

func WithMessage(err error, message string) error

WithMessage annotates err with a new message. The messages of given error is hidden. If err is nil, WithMessage returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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