errutil

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound must equal Geth's not-found error. This is because some Geth components we use throw the latter, and
	// we want to be able to catch both types in a single error-check.
	ErrNotFound      = ethereum.NotFound
	ErrAlreadyExists = errors.New("already exists")
	ErrNoImpl        = errors.New("not implemented")

	ErrBlockAlreadyProcessed = errors.New("block already processed")
	ErrBlockAncestorNotFound = errors.New("block ancestor not found")
	ErrBlockForBatchNotFound = errors.New("block for batch not found")
	ErrAncestorBatchNotFound = errors.New("parent for batch not found")
)

Functions

This section is empty.

Types

type BlockRejectError

type BlockRejectError struct {
	L1Head  gethcommon.Hash
	Wrapped error
}

BlockRejectError is used as a standard format for error response from enclave for block submission errors The L1 Head hash tells the host what the enclave knows as the canonical chain head, so it can feed it the appropriate block.

func (BlockRejectError) Error

func (r BlockRejectError) Error() string

func (BlockRejectError) Is

func (r BlockRejectError) Is(err error) bool

Is implementation supports the errors.Is() behaviour. The error being sent over the wire means we lose the typing on the `Wrapped` error, but comparing the string helps in our use cases of standard exported errors above

func (BlockRejectError) Unwrap

func (r BlockRejectError) Unwrap() error

type EVMSerialisableError

type EVMSerialisableError struct {
	Err    string
	Reason interface{}
	Code   int
}

EVMSerialisableError is an API error that encompasses an EVM error with a code and a reason

func (EVMSerialisableError) Error

func (e EVMSerialisableError) Error() string

func (EVMSerialisableError) ErrorCode

func (e EVMSerialisableError) ErrorCode() int

func (EVMSerialisableError) ErrorData

func (e EVMSerialisableError) ErrorData() interface{}

Jump to

Keyboard shortcuts

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