stateerr

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidInput

func IsInvalidInput(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsTxCommitmentError

func IsTxCommitmentError(err error) bool

Types

type ErrorType

type ErrorType byte
const (
	// DeserializationError indicates a failure to unmarshal data (e.g., block or transaction).
	DeserializationError ErrorType = iota + 1

	// NotFoundError is returned when a requested entity cannot be located.
	NotFoundError

	// TxValidationError indicates a transaction failed validation checks.
	TxValidationError

	// TxCommitmentError indicates a failure while committing a transaction.
	TxCommitmentError

	// ValidationError is a generic validation failure.
	ValidationError

	// RollbackError occurs when rolling back a state change fails.
	RollbackError

	// RetrievalError covers failures when reading data from the database.
	RetrievalError

	// ModificationError covers failures when updating or modifying state data.
	ModificationError

	// InvalidInputError indicates that input data is malformed or otherwise invalid.
	InvalidInputError

	// IncompatibilityError indicates mismatched or incompatible data or versions.
	IncompatibilityError

	// ClosureError indicates a failure to properly close the database or block storage.
	ClosureError

	// Other is used for miscellaneous technical errors that should not normally occur.
	Other
)

type StateError

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

func NewStateError

func NewStateError(errorType ErrorType, originalError error) StateError

func (StateError) Error

func (err StateError) Error() string

func (StateError) Type

func (err StateError) Type() ErrorType

func (StateError) Unwrap

func (err StateError) Unwrap() error

Jump to

Keyboard shortcuts

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