errdefs

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithExecError

func WithExecError(err error, inputs, mounts []solver.Result) error

func WithExecErrorWithContext added in v0.9.0

func WithExecErrorWithContext(ctx context.Context, err error, inputs, mounts []solver.Result) error

func WithFileActionError

func WithFileActionError(err error, idx int) error

Types

type ExecError

type ExecError struct {
	Inputs        []solver.Result
	Mounts        []solver.Result
	OwnerBorrowed bool
	// contains filtered or unexported fields
}

ExecError will be returned when an error is encountered when evaluating an op. The error owns its original refs until Borrow or the first Release. Proxies and gateways retain the error; gateways also keep independent clones. They may clone cached originals after Release, which native result handles support while another ref pins the snapshot. When sharedOp.Exec completes with an active solver state, that state pins error refs until its last job leaves. Pinning follows a single Unwrap chain, not errors.Join branches; CacheMap and Acquire errors do not get that pin.

func (*ExecError) Borrow added in v0.35.0

func (e *ExecError) Borrow() bool

Borrow marks the error's refs as owned by a caller, so the finalizer and Release do not release them. The same error can be shared by multiple callers; Borrow returns false if the refs were already borrowed. The successful caller must release the refs; later callers acquire no ownership.

func (*ExecError) EachRef

func (e *ExecError) EachRef(fn func(solver.Result) error) (err error)

func (*ExecError) Release

func (e *ExecError) Release() error

func (*ExecError) Unwrap

func (e *ExecError) Unwrap() error

type FileActionError

type FileActionError struct {
	Index int
	// contains filtered or unexported fields
}

FileActionError will be returned when an error is encountered when solving a fileop.

func (*FileActionError) ToSubject

func (e *FileActionError) ToSubject() serrdefs.IsSolve_Subject

func (*FileActionError) Unwrap

func (e *FileActionError) Unwrap() error

Jump to

Keyboard shortcuts

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