xerr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPolicyMetadataContiguous = wrapCategory(ErrIndex, "title, description, version, and tag may only appear in one contiguous block at the top of the policy, before all fact and use statements.")
	ErrPolicyFactAfterUse       = wrapCategory(ErrIndex, "fact statements must appear before any use statements.")
	ErrPolicyInvalidVersion     = wrapCategory(ErrIndex, `Invalid policy version: expected SemVer string (e.g., "1.2.3").`)
	ErrPolicyEmptyTitle         = wrapCategory(ErrIndex, "policy title must not be empty or whitespace-only.")
	ErrPolicyEmptyTagKey        = wrapCategory(ErrIndex, "tag key must not be empty or whitespace-only.")
)

Policy indexing: literal metadata and header ordering. Each value wraps ErrIndex; add location at the call site with fmt.Errorf("at %s: %w", span, err).

View Source
var ErrIndex = errors.New("index error")

ErrIndex is the root sentinel for static index construction and validation failures.

View Source
var ErrNotImplemented = &NotImplementedError{}
View Source
var ErrRuntimePanic = &RuntimePanic{}

Functions

func ErrConflict

func ErrConflict(what string, where, with tokens.Range) error

func ErrImportResolution

func ErrImportResolution(module, fn string) error

func ErrInfiniteRecursion

func ErrInfiniteRecursion(stack []string) error

func ErrInjected

func ErrInjected(format string, args ...any) error

func ErrInvalidInvocation

func ErrInvalidInvocation(reason string) error

func ErrInvalidType

func ErrInvalidType(got, expected string) error

func ErrModuleInvocation

func ErrModuleInvocation(module, fn string) error

func ErrNamespaceNotFound

func ErrNamespaceNotFound(name string) error

func ErrNotExported

func ErrNotExported(fqn string) error

func ErrPolicyNotFound

func ErrPolicyNotFound(fqn string) error

func ErrRequiredFact

func ErrRequiredFact(name string) error

func ErrRuleNotFound

func ErrRuleNotFound(fqn string) error

func ErrShapeNotFound

func ErrShapeNotFound(name string) error

func ErrShapeValidation

func ErrShapeValidation(msg string) error

func ErrUnresolvableFact

func ErrUnresolvableFact(name string) error

Types

type ConflictError

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

func (ConflictError) Error

func (e ConflictError) Error() string

type ImportResolutionError

type ImportResolutionError struct{}

func (ImportResolutionError) Error

func (e ImportResolutionError) Error() string

type InfiniteRecursionError

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

func (InfiniteRecursionError) Error

func (e InfiniteRecursionError) Error() string

type InjectedError

type InjectedError struct {
}

Error injected by calling the `error` function in sentrie code

func (InjectedError) Error

func (e InjectedError) Error() string

type InvalidInvocationError

type InvalidInvocationError struct{}

func (InvalidInvocationError) Error

func (e InvalidInvocationError) Error() string

type InvalidTypeError

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

func (InvalidTypeError) Error

func (e InvalidTypeError) Error() string

type ModuleInvocationError

type ModuleInvocationError struct{}

func (ModuleInvocationError) Error

func (e ModuleInvocationError) Error() string

type NotExportedError

type NotExportedError struct{}

func (NotExportedError) Error

func (e NotExportedError) Error() string

type NotFoundError

type NotFoundError struct{}

func (NotFoundError) Error

func (e NotFoundError) Error() string

type NotImplementedError

type NotImplementedError struct{}

func (*NotImplementedError) Error

func (e *NotImplementedError) Error() string

func (*NotImplementedError) Unwrap

func (e *NotImplementedError) Unwrap() error

type RuntimePanic

type RuntimePanic struct{}

func (RuntimePanic) Error

func (e RuntimePanic) Error() string

type ShapeValidationError

type ShapeValidationError struct{}

func (ShapeValidationError) Error

func (e ShapeValidationError) Error() string

Jump to

Keyboard shortcuts

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