errs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

Fatal logs the error and exists the program with os.Exit(1).

func Log

func Log(err error) error

Log just calls LogWith(err, log.V(log.Info)).

func LogError

func LogError(task string, err error) error

LogError is a wrapper that calls Log(NewError(task, err)).

func LogErrorWithHint

func LogErrorWithHint(task string, err error, hint string) error

LogErrorWithHint is a wrapper that calls Log(NewErrorWithHint(task, err, hint)).

func LogWith

func LogWith(err error, logger log.Logger) error

LogWith logs the given error using the given logger.

func RootCause

func RootCause(err error) error

RootCause returns the error deepest in the error chain.

Types

type Err

type Err interface {
	error
	Task() string
	Err() error
	Hint() string
}

func NewError

func NewError(task string, err error) Err

func NewErrorWithHint

func NewErrorWithHint(task string, err error, hint string) Err

Jump to

Keyboard shortcuts

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