errors

package
v2.934.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrGeneration = Error("failed to generate output")
	ErrOpenAPIV2  = Error("openapi v2 is not supported")
)

Variables

This section is empty.

Functions

func As

func As(err error, target any) bool

As will set target errors value to equal Error if they are equivalent

func GetCircularReferenceString

func GetCircularReferenceString(visited []string) string

func Is

func Is(err error, target error) bool

Is checks if err is equivalent to target

func IsUnsupported

func IsUnsupported(err error) bool

func IsValidationErr

func IsValidationErr(err error) bool

func Join

func Join(errs ...error) error

Join joins the errors together into a single error

func New

func New(message string) error

New creates a new error with the given message

func NewCircularReferenceError

func NewCircularReferenceError(visited []string) error

Types

type Error

type Error string

Error is a comparable string error suitable for const sentinels.

func (Error) As

func (s Error) As(target interface{}) bool

func (Error) Error

func (s Error) Error() string

func (Error) Is

func (s Error) Is(target error) bool

func (Error) Wrap

func (s Error) Wrap(err error) error

Wrap adds err as a cause while retaining Error's compatible message matching.

type PanicError

type PanicError struct {
	StackTrace string
	Cause      error
}

func NewPanicError

func NewPanicError(cause error) *PanicError

func (PanicError) Error

func (e PanicError) Error() string

func (PanicError) Is

func (e PanicError) Is(target error) bool

func (PanicError) Unwrap

func (e PanicError) Unwrap() error

type Severity

type Severity string
const (
	SeverityError Severity = "error"
	SeverityWarn  Severity = "warn"
	SeverityHint  Severity = "hint"
)

type SkippedEntity

type SkippedEntity struct {
	Name string
	Type string
}

type SkippedError

type SkippedError struct {
	SkippedEntity SkippedEntity
	*UnsupportedError
}

func NewSkippedError

func NewSkippedError(skippedEntity SkippedEntity, uErr *UnsupportedError) *SkippedError

func (SkippedError) Error

func (e SkippedError) Error() string

type UnsupportedError

type UnsupportedError struct {
	Message string
	Node    *yaml.Node
}

func GetUnsupportedErr

func GetUnsupportedErr(err error) *UnsupportedError

func NewUnsupportedError

func NewUnsupportedError(msg string, node *yaml.Node) *UnsupportedError

func (UnsupportedError) Error

func (e UnsupportedError) Error() string

func (UnsupportedError) GetColumnNumber

func (e UnsupportedError) GetColumnNumber() int

func (UnsupportedError) GetLineNumber

func (e UnsupportedError) GetLineNumber() int

func (UnsupportedError) Is

func (e UnsupportedError) Is(target error) bool

type ValidationError

type ValidationError struct {
	Message  string
	Node     *yaml.Node
	Cause    error
	Severity Severity
	Rule     string
}

func GetValidationErr

func GetValidationErr(err error) *ValidationError

func NewResolveError

func NewResolveError(err error, node *yaml.Node) *ValidationError

func NewValidationError

func NewValidationError(msg string, node *yaml.Node, err error) *ValidationError

func NewValidationHint

func NewValidationHint(msg string, node *yaml.Node, err error) *ValidationError

func NewValidationWarning

func NewValidationWarning(msg string, node *yaml.Node, err error) *ValidationError

func (ValidationError) Error

func (e ValidationError) Error() string

func (*ValidationError) GetColumnNumber

func (e *ValidationError) GetColumnNumber() int

GetColumnNumber returns the column number from the Node, or -1 if not available

func (*ValidationError) GetLineNumber

func (e *ValidationError) GetLineNumber() int

GetLineNumber returns the line number from the Node, or -1 if not available

func (ValidationError) GetResult

func (e ValidationError) GetResult() *validation.Error

func (ValidationError) Is

func (e ValidationError) Is(target error) bool

func (ValidationError) Unwrap

func (e ValidationError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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