errors

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TryUpdateError

func TryUpdateError(lastErr *lssv1alpha1.Error, err error) *lssv1alpha1.Error

TryUpdateError tries to update the properties of the last error if the err is an internal landscaper services error.

func UpdatedError

func UpdatedError(lastError *lssv1alpha1.Error, operation, reason, message string) *lssv1alpha1.Error

UpdatedError updates the properties of an error.

Types

type Error

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

Error is a wrapper around the landscaper service crd error that implements the go error interface.

func IsError

func IsError(err error) (*Error, bool)

IsError returns the innermost landscaper service error if the given error is one. If the err does not contain a landscaper service error, nil is returned.

func NewError

func NewError(operation, reason, message string) *Error

NewError creates a new landscaper service internal error

func NewWrappedError

func NewWrappedError(err error, operation, reason, message string) *Error

NewWrappedError creates a new landscaper service internal error that wraps another error

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface

func (*Error) LandscaperServiceError

func (e *Error) LandscaperServiceError() *lssv1alpha1.Error

LandscaperServiceError returns the wrapped landscaper error.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap implements the unwrap interface

func (Error) UpdatedError

func (e Error) UpdatedError(lastError *lssv1alpha1.Error) *lssv1alpha1.Error

UpdatedError updates the properties of an existing error.

Jump to

Keyboard shortcuts

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