errors

package
v0.56.8 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelUserError

func LabelUserError(messageFormat string, messageA []interface{}) string

LabelUserError labels the failure RunStatus message if any of its error messages has been wrapped as an UserError. It indicates that the user is responsible for an error. See github.com/tektoncd/pipeline/blob/main/docs/pipelineruns.md#marking-off-user-errors for more details.

func WrapUserError

func WrapUserError(err error) error

WrapUserError wraps the original error with the user error label

Types

type UserError

type UserError struct {
	Reason   string
	Original error
}

func (*UserError) Error

func (e *UserError) Error() string

Error returns the original error message. This implements the error.Error interface.

func (*UserError) Unwrap

func (e *UserError) Unwrap() error

Unwrap returns the original error without the Reason annotation. This is intended to support usage of errors.Is and errors.As with Errors.

Jump to

Keyboard shortcuts

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