errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAdmissionRejected = errors.New("admission rejected")
	ErrAdmissionSignaled = errors.New("admission capacity exceeded (signaled)")
	ErrQueueFull         = errors.New("queue full")
)

Admission & Capacity

View Source
var (
	ErrClientCanceled   = errors.New("client canceled")
	ErrServerShutdown   = errors.New("server shutdown")
	ErrDeadlineExceeded = errors.New("deadline exceeded")
)

Cancellation & Shutdown

View Source
var (
	ErrExecutionFailed = errors.New("execution failed")
	ErrPanicRecovered  = errors.New("panic recovered")
)

Execution Failures

View Source
var (
	ErrPartialFailure      = errors.New("partial failure")
	ErrInsufficientSuccess = errors.New("insufficient success")
)

Stream / Message Semantics

Functions

func Wrap

func Wrap(kind Kind, err error) error

Wrap attaches semantics meaning to an error.

func WrapIfNeeded

func WrapIfNeeded(kind Kind, err error) error

WrapIfNeeded avoids double-wrapping.

Types

type Error

type Error struct {
	Kind Kind
	Err  error
}

Error wraps an underlying error with semantic intent.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Kind

type Kind int

Kind defines machine-readable error semantics.

const (
	KindUnknown Kind = iota
	KindAdmission
	KindCancellation
	KindDeadline
	KindShutdown
	KindExecution
	KindPanic
	KindPartial
)

func Classify

func Classify(err error) Kind

Jump to

Keyboard shortcuts

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