errors

package
v0.0.0-...-a208e16 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotate

func Annotate(other error, message string) error

Annotate is equivalent to Annotate from the github.com/juju/errors package.

func Annotatef

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

Annotatef is equivalent to Annotatef from the github.com/juju/errors package.

func Cause

func Cause(err error) error

Cause is equivalent to Cause from the github.com/juju/errors package.

func Errorf

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

Errorf is equivalent to Errorf from the github.com/juju/errors package.

func GetMTU

func GetMTU(err error) int

GetMTU returns the mtu associated with err. If err is not an MTU error (see IsMTU), GetMTU returns 0.

func IsMTU

func IsMTU(err error) bool

IsMTU returns true if err is an MTU error as constructed using MTUf.

func IsNoRoute

func IsNoRoute(err error) bool

IsNoRoute returns true if err is a no route-related error as constructed using NewNoRoute.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout returns true if err has a Timeout() bool method that returns true.

func MTUf

func MTUf(mtu int, format string, args ...interface{}) error

MTUf constructs a new MTU error.

func New

func New(message string) error

New is equivalent to New from the github.com/juju/errors package.

func NewNoRoute

func NewNoRoute(host string) error

NewNoRoute constructs a new error indicating that there is no route to the given host.

func Timeoutf

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

Timeoutf constructs a new timeout error with a Timeout() bool method that returns true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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