engine_errs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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