errors

package
v0.0.0-...-03dfc37 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause - Returns the underlying cause error.

func Causes

func Causes(errs []error) (cerrs []error)

Causes - Returns slice of underlying cause error.

func Init

func Init(gopath string, p string)

Init - initialize package path.

func IsErr

func IsErr(err error, errs ...error) bool

IsErr returns whether given error is exact error.

func IsErrIgnored

func IsErrIgnored(err error, ignoredErrs ...error) bool

IsErrIgnored returns whether given error is ignored or not.

func Trace

func Trace(e error, errs ...error) error

Trace - return new Error type.

func Tracef

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

Tracef behaves like fmt.Errorf but adds traces to the returned error.

Types

type Error

type Error struct {
	Cause error // Holds the cause error
	// contains filtered or unexported fields
}

Error - error type containing cause and the stack trace.

func (Error) Error

func (e Error) Error() string

Implement error interface.

func (Error) Stack

func (e Error) Stack() []string

Stack - returns slice of stack trace.

Jump to

Keyboard shortcuts

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