engine_errs

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineError

type EngineError interface {
	error
	// ToJSONMap returns a map that can be marshaled to JSON. Uses this instead of MarshalJSON to avoid
	// repeated marshalling of common fields (such as 'error_code') and to allow for consistent formatting
	// (eg for pretty-print).
	ToJSONMap() map[string]any
	ErrorCode() ErrorCode
}

type ErrorCode

type ErrorCode string
const (
	InternalErrCode     ErrorCode = "internal"
	ConfigInvalidCode   ErrorCode = "config_invalid"
	EdgeInvalidCode     ErrorCode = "edge_invalid"
	EdgeUnsupportedCode ErrorCode = "edge_unsupported"
)

type ErrorTree

type ErrorTree struct {
	Chain    []string    `json:"chain,omitempty"`
	Children []ErrorTree `json:"children,omitempty"`
}

func ErrorsToTree

func ErrorsToTree(err error) (tree ErrorTree)

func (ErrorTree) Error

func (t ErrorTree) Error() string

type InternalError

type InternalError struct {
	Err error
}

func (InternalError) Error

func (e InternalError) Error() string

func (InternalError) ErrorCode

func (e InternalError) ErrorCode() ErrorCode

func (InternalError) ToJSONMap

func (e InternalError) ToJSONMap() map[string]any

func (InternalError) Unwrap

func (e InternalError) Unwrap() error

type InvalidPathErr

type InvalidPathErr struct {
	// ExpandEdge is the overall edge that is being expanded
	ExpandEdge construct.SimpleEdge
	// SatisfactionEdge is the specific edge that was being expanded when the error occurred
	SatisfactionEdge construct.SimpleEdge
	Classification   string
}

func (InvalidPathErr) Error

func (e InvalidPathErr) Error() string

func (InvalidPathErr) ErrorCode

func (e InvalidPathErr) ErrorCode() ErrorCode

func (InvalidPathErr) ToJSONMap

func (e InvalidPathErr) ToJSONMap() map[string]any

type UnsupportedExpansionErr

type UnsupportedExpansionErr struct {
	// ExpandEdge is the overall edge that is being expanded
	ExpandEdge construct.SimpleEdge
	// SatisfactionEdge is the specific edge that was being expanded when the error occurred
	SatisfactionEdge construct.SimpleEdge
	Classification   string
}

func (UnsupportedExpansionErr) Error

func (e UnsupportedExpansionErr) Error() string

func (UnsupportedExpansionErr) ErrorCode

func (e UnsupportedExpansionErr) ErrorCode() ErrorCode

func (UnsupportedExpansionErr) ToJSONMap

func (e UnsupportedExpansionErr) ToJSONMap() map[string]any

Jump to

Keyboard shortcuts

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