kind: sigs.k8s.io/kind/pkg/errors Index | Files

package errors

import "sigs.k8s.io/kind/pkg/errors"

Package errors provides common utilities for dealing with errors

Index

Package Files

aggregate.go concurrent.go doc.go errors.go

func AggregateConcurrent Uses

func AggregateConcurrent(funcs []func() error) error

AggregateConcurrent runs fns concurrently, returning a NewAggregate if there are > 1 errors

func Errorf Uses

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

Errorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called.

func Errors Uses

func Errors(err error) []error

Errors returns the deepest Aggregate in a Cause chain

func New Uses

func New(message string) error

New returns an error with the supplied message. New also records the stack trace at the point it was called.

func NewAggregate Uses

func NewAggregate(errlist []error) error

NewAggregate is a k8s.io/apimachinery/pkg/util/errors.NewAggregate wrapper note that while it returns a StackTrace wrapped Aggregate That has been Flattened and Reduced

func StackTrace Uses

func StackTrace(err error) pkgerrors.StackTrace

StackTrace returns the deepest StackTrace in a Cause chain https://github.com/pkg/errors/issues/173

func UntilErrorConcurrent Uses

func UntilErrorConcurrent(funcs []func() error) error

UntilErrorConcurrent runs all funcs in separate goroutines, returning the first non-nil error returned from funcs, or nil if all funcs return nil

func WithStack Uses

func WithStack(err error) error

WithStack annotates err with a stack trace at the point WithStack was called. If err is nil, WithStack returns nil.

func Wrap Uses

func Wrap(err error, message string) error

Wrap returns an error annotating err with a stack trace at the point Wrap is called, and the supplied message. If err is nil, Wrap returns nil.

func Wrapf Uses

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

Wrapf returns an error annotating err with a stack trace at the point Wrapf is called, and the format specifier. If err is nil, Wrapf returns nil.

type Causer Uses

type Causer interface {
    // Cause returns the underlying error
    Cause() error
}

Causer is an interface to github.com/pkg/errors error's Cause() wrapping

type StackTracer Uses

type StackTracer interface {
    // StackTrace returns the StackTrace ...
    // TODO: return our own type instead?
    // https://github.com/pkg/errors#roadmap
    StackTrace() pkgerrors.StackTrace
}

StackTracer is an interface to github.com/pkg/errors error's StackTrace()

Package errors imports 3 packages (graph) and is imported by 41 packages. Updated 2019-11-12. Refresh now. Tools for package owners.