errclass

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotRepo             = &JVSError{Code: "E_NOT_REPO"}
	ErrNotWorkspace        = &JVSError{Code: "E_NOT_WORKSPACE"}
	ErrTargetMismatch      = &JVSError{Code: "E_TARGET_MISMATCH"}
	ErrUsage               = &JVSError{Code: "E_USAGE"}
	ErrNameInvalid         = &JVSError{Code: "E_NAME_INVALID"}
	ErrPathEscape          = &JVSError{Code: "E_PATH_ESCAPE"}
	ErrDescriptorCorrupt   = &JVSError{Code: "E_DESCRIPTOR_CORRUPT"}
	ErrPayloadHashMismatch = &JVSError{Code: "E_PAYLOAD_HASH_MISMATCH"}
	ErrLineageBroken       = &JVSError{Code: "E_LINEAGE_BROKEN"}
	ErrPartialSnapshot     = &JVSError{Code: "E_PARTIAL_SNAPSHOT"}
	ErrGCPlanMismatch      = &JVSError{Code: "E_GC_PLAN_MISMATCH"}
	ErrFormatUnsupported   = &JVSError{Code: "E_FORMAT_UNSUPPORTED"}
	ErrAuditChainBroken    = &JVSError{Code: "E_AUDIT_CHAIN_BROKEN"}
	ErrRepoBusy            = &JVSError{Code: "E_REPO_BUSY"}
	ErrLockConflict        = &JVSError{Code: "E_LOCK_CONFLICT"}
)

All stable error classes for v0.x.

Functions

This section is empty.

Types

type JVSError

type JVSError struct {
	Code    string
	Message string
	Hint    string
}

JVSError is a stable, machine-readable error class for JVS operations. It implements the error interface and supports error comparison via Is().

func (*JVSError) Error

func (e *JVSError) Error() string

func (*JVSError) Is

func (e *JVSError) Is(target error) bool

func (*JVSError) WithHint

func (e *JVSError) WithHint(hint string) *JVSError

WithHint returns a new JVSError with the same Code and Message plus a hint.

func (*JVSError) WithMessage

func (e *JVSError) WithMessage(msg string) *JVSError

WithMessage returns a new JVSError with the same Code but a specific message.

func (*JVSError) WithMessagef

func (e *JVSError) WithMessagef(format string, args ...any) *JVSError

WithMessagef returns a new JVSError with a formatted message.

Jump to

Keyboard shortcuts

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