errutil

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 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")
	ErrCrossChainBundleRepublished = errors.New("root already added to the message bus")
	ErrCrossChainBundleNoBatches   = errors.New("no batches for cross chain bundle")
	ErrNoNextRollup                = errors.New("no next rollup")
	ErrRollupForkMismatch          = errors.New("rollup fork mismatch")
	ErrNoBundleToPublish           = errors.New("no bundle to publish")
)

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 DataError added in v0.24.1

type DataError struct {
	Code   int         `json:"code"`
	Err    string      `json:"message"`
	Reason interface{} `json:"data,omitempty"`
}

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

func (DataError) Error added in v0.24.1

func (e DataError) Error() string

func (DataError) ErrorCode added in v0.24.1

func (e DataError) ErrorCode() int

func (DataError) ErrorData added in v0.24.1

func (e DataError) ErrorData() interface{}

Jump to

Keyboard shortcuts

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