errors

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNotCortexError = "errors.not_cortex_error"

Variables

This section is empty.

Functions

func AddError

func AddError(errs []error, err error, strs ...string) ([]error, bool)

func AddErrors

func AddErrors(errs []error, newErrs []error, strs ...string) ([]error, bool)

func Append added in v0.16.0

func Append(err error, str string) error

adds to the end of the error message (without adding any whitespace or punctuation)

func AreAllErrors added in v0.17.0

func AreAllErrors(errs []error) bool

func CastRecoverError

func CastRecoverError(errInterface interface{}, strs ...string) error

func Cause

func Cause(err error) error

Returns nil if no cause

func CauseOrSelf added in v0.15.0

func CauseOrSelf(err error) error

func FirstError

func FirstError(errs ...error) error

func FirstErrorInMap added in v0.17.0

func FirstErrorInMap(errs map[string]error) error

func FirstKeyInErrorMap added in v0.17.0

func FirstKeyInErrorMap(errs map[string]error) string

func GetKind added in v0.15.0

func GetKind(err error) string

func HasError added in v0.13.0

func HasError(errs []error) bool

func IsNoPrint added in v0.15.0

func IsNoPrint(err error) bool

func IsNoTelemetry added in v0.15.0

func IsNoTelemetry(err error) bool

func MapHasError added in v0.17.0

func MapHasError(errs map[string]error) bool

func Message added in v0.13.0

func Message(err error, strs ...string) string

func MessageFirstLine added in v0.14.0

func MessageFirstLine(err error, strs ...string) string

func NonNilErrorMapKeys added in v0.17.0

func NonNilErrorMapKeys(errs map[string]error) []string

func PrintError

func PrintError(err error, strs ...string)

func PrintErrorForUser added in v0.15.0

func PrintErrorForUser(err error, strs ...string)

func PrintStacktrace

func PrintStacktrace(err error)

func SetNoPrint added in v0.15.0

func SetNoPrint(err error) error

func SetNoTelemetry added in v0.15.0

func SetNoTelemetry(err error) error

func WithStack added in v0.4.0

func WithStack(err error) error

func Wrap

func Wrap(err error, strs ...string) error

func WrapAll added in v0.10.0

func WrapAll(errs []error, strs ...string) []error

Types

type Error added in v0.15.0

type Error struct {
	Kind        string
	Message     string
	NoTelemetry bool
	NoPrint     bool
	Cause       error
	// contains filtered or unexported fields
}

func (*Error) Error added in v0.15.0

func (cortexError *Error) Error() string

func (*Error) Format added in v0.15.0

func (cortexError *Error) Format(s fmt.State, verb rune)

func (*Error) StackTrace added in v0.15.0

func (cortexError *Error) StackTrace() pkgerrors.StackTrace

Jump to

Keyboard shortcuts

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