chkitErrors

package
v3.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: MIT Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExitCoder

func NewExitCoder(err error) cli.ExitCoder

Types

type Err

type Err string

func (Err) Comment

func (err Err) Comment(comments ...string) *Wrapper

func (Err) CommentF

func (err Err) CommentF(f string, args ...interface{}) *Wrapper

func (Err) Error

func (err Err) Error() string

func (Err) Errors

func (err Err) Errors() []error

func (Err) ExitCode

func (err Err) ExitCode() int

func (Err) Match

func (err Err) Match(errs ...error) bool

func (Err) Wrap

func (err Err) Wrap(errs ...error) *Wrapper

type ErrMatcher

type ErrMatcher interface {
	error
	Match(...error) bool
}

type ExitCoder

type ExitCoder struct {
	Err  error
	Code int
}

func (*ExitCoder) Error

func (coder *ExitCoder) Error() string

func (*ExitCoder) ExitCode

func (coder *ExitCoder) ExitCode() int

type Fatality

type Fatality interface {
	error
	Unwrap() error
	Fatal() string
	Map(func(err error) error) Fatality
}

func Fatal

func Fatal(err error) Fatality

func FatalString

func FatalString(err string, args ...interface{}) Fatality

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

func Wrap

func Wrap(err error, reasons ...error) *Wrapper

func (*Wrapper) AddReasonF

func (wrapper *Wrapper) AddReasonF(f string, vals ...interface{}) *Wrapper

func (*Wrapper) AddReasons

func (wrapper *Wrapper) AddReasons(reasons ...error) *Wrapper

func (*Wrapper) Comment

func (wrapper *Wrapper) Comment(comments ...string) *Wrapper

func (*Wrapper) CommentF

func (wrapper *Wrapper) CommentF(f string, args ...interface{}) *Wrapper

func (*Wrapper) Error

func (wrapper *Wrapper) Error() string

func (*Wrapper) Errors

func (wrapper *Wrapper) Errors() []error

func (*Wrapper) ExitCode

func (wrapper *Wrapper) ExitCode() int

func (*Wrapper) Match

func (wrapper *Wrapper) Match(errs ...error) bool

Jump to

Keyboard shortcuts

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