errors

package
v0.0.0-...-5063248 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIStatuses

func APIStatuses(err error) ([]metav1.Status, bool)

APIStatuses returns the list of API status contained in a given error, and a boolean which is true if the error consists only of API statuses.

func AllErrors

func AllErrors(err error, pred func(error) bool) bool

AllErrors returns a boolean which is true if the predicate for all errors in the given error return true.

func Append

func Append(target error, toAdd ...error) error

Append some errors to an existing error, creating a composite if necessary.

func ResolveErrorStatuses

func ResolveErrorStatuses(
	scheme *runtime.Scheme,
	resources []runtime.Object,
	action func(obj runtime.Object, err *errors.StatusError) error,
	err error,
) error

ResolveErrorStatuses tries to resolve all statuses in the given error with an action function. If any status cannot be resolved, an error is returned.

Types

type CompositeError

type CompositeError interface {
	Errors() []error
}

A CompositeError is an error formed from multiple other errors.

Jump to

Keyboard shortcuts

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