errors

package
v0.23.4-rest-events Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: AGPL-3.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(err error, target interface{}) bool

As is a utility function to call std error lib `As` function. As finds the first error in err's chain that matches target, and if so, sets target to that error value and returns true. Otherwise, it returns false. The chain consists of err itself followed by the sequence of errors obtained by repeatedly calling Unwrap.

func HandleRuntimeError

func HandleRuntimeError(err error) error

HandleRuntimeError handles runtime errors and separates errors generated by runtime from fvm errors (e.g. environment errors)

func Is

func Is(err error, target error) bool

Is is a utility function to call std error lib `Is` function for instance equality checks.

func IsALedgerFailure added in v0.21.0

func IsALedgerFailure(err error) bool

IsALedgerFailure returns true if the error or any of the wrapped errors is a ledger failure

func IsAccountAccountPublicKeyNotFoundError

func IsAccountAccountPublicKeyNotFoundError(err error) bool

IsAccountAccountPublicKeyNotFoundError returns true if error has this type

func IsAccountNotFoundError

func IsAccountNotFoundError(err error) bool

IsAccountNotFoundError returns true if error has this type

func IsCadenceRuntimeError

func IsCadenceRuntimeError(err error) bool

IsCadenceRuntimeError returns true if error has this type

func NewAccountAlreadyExistsError

func NewAccountAlreadyExistsError(address flow.Address) error

NewAccountAlreadyExistsError constructs a new AccountAlreadyExistsError

func NewAccountNotFoundError

func NewAccountNotFoundError(address flow.Address) error

NewAccountNotFoundError constructs a new AccountNotFoundError

func NewContractNamesNotFoundError

func NewContractNamesNotFoundError(address flow.Address) error

NewContractNamesNotFoundError constructs a new ContractNamesNotFoundError

func NewContractNotFoundError

func NewContractNotFoundError(address flow.Address, contract string) error

NewContractNotFoundError constructs a new ContractNotFoundError

func NewFrozenAccountError

func NewFrozenAccountError(address flow.Address) error

NewFrozenAccountError constructs a new FrozenAccountError

func SplitErrorTypes

func SplitErrorTypes(inp error) (err Error, failure Failure)

SplitErrorTypes splits the error into fatal (failures) and non-fatal errors

Types

type AccountAlreadyExistsError

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

AccountAlreadyExistsError is returned when account creation fails because another account already exist at that address TODO maybe this should be failure since user has no control over this

func (AccountAlreadyExistsError) Code

Code returns the error code for this error type

func (AccountAlreadyExistsError) Error

type AccountAuthorizationError

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

AccountAuthorizationError indicates that an authorization issues either a transaction is missing a required signature to authorize access to an account or a transaction doesn't have authorization to performe some operations like account creation.

func NewAccountAuthorizationErrorf

func NewAccountAuthorizationErrorf(address flow.Address, msg string, args ...interface{}) *AccountAuthorizationError

NewAccountAuthorizationErrorf constructs a new AccountAuthorizationError

func (AccountAuthorizationError) Address added in v0.16.0

Address returns the address of an account without enough authorization

func (AccountAuthorizationError) Code

Code returns the error code for this error type

func (AccountAuthorizationError) Error

func (AccountAuthorizationError) Unwrap

func (e AccountAuthorizationError) Unwrap() error

Unwrap unwraps the error

type AccountNotFoundError

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

AccountNotFoundError is returned when account doesn't exist for the given address

func (AccountNotFoundError) Code

Code returns the error code for this error type

func (AccountNotFoundError) Error

func (e AccountNotFoundError) Error() string

type AccountPublicKeyNotFoundError

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

AccountPublicKeyNotFoundError is returned when a public key not found for the given address and key index

func NewAccountPublicKeyNotFoundError

func NewAccountPublicKeyNotFoundError(address flow.Address, keyIndex uint64) *AccountPublicKeyNotFoundError

NewAccountPublicKeyNotFoundError constructs a new AccountPublicKeyNotFoundError

func (AccountPublicKeyNotFoundError) Code

Code returns the error code for this error type

func (AccountPublicKeyNotFoundError) Error

type BlockFinderFailure

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

BlockFinderFailure captures a fatal caused by block finder

func NewBlockFinderFailure

func NewBlockFinderFailure(err error) *BlockFinderFailure

NewBlockFinderFailure constructs a new BlockFinderFailure

func (BlockFinderFailure) Error

func (e BlockFinderFailure) Error() string

func (BlockFinderFailure) FailureCode

func (e BlockFinderFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (BlockFinderFailure) Unwrap

func (e BlockFinderFailure) Unwrap() error

Unwrap unwraps the error

type CadenceRuntimeError

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

CadenceRuntimeError captures a collection of errors provided by cadence runtime it cover cadence errors such as NotDeclaredError, NotInvokableError, ArgumentCountError, TransactionNotDeclaredError, ConditionError, RedeclarationError, DereferenceError, OverflowError, UnderflowError, DivisionByZeroError, DestroyedCompositeError, ForceAssignmentToNonNilResourceError, ForceNilError, TypeMismatchError, InvalidPathDomainError, OverwriteError, CyclicLinkError, ArrayIndexOutOfBoundsError, ...

func NewCadenceRuntimeError

func NewCadenceRuntimeError(err *runtime.Error) *CadenceRuntimeError

NewCadenceRuntimeError constructs a new CadenceRuntimeError and wraps a cadence runtime error

func (CadenceRuntimeError) Code

func (e CadenceRuntimeError) Code() ErrorCode

Code returns the error code for this error

func (CadenceRuntimeError) Error

func (e CadenceRuntimeError) Error() string

func (CadenceRuntimeError) Unwrap

func (e CadenceRuntimeError) Unwrap() error

Unwrap returns the wrapped err

type ContractNamesNotFoundError

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

ContractNamesNotFoundError is returned when fetching a list of contract names under an account

func (*ContractNamesNotFoundError) Code

Code returns the error code for this error type

func (*ContractNamesNotFoundError) Error

type ContractNotFoundError

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

ContractNotFoundError is returned when an account contract is not found

func (*ContractNotFoundError) Code

func (e *ContractNotFoundError) Code() ErrorCode

Code returns the error code for this error type

func (*ContractNotFoundError) Error

func (e *ContractNotFoundError) Error() string

type EncodingFailure

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

EncodingFailure captures an fatal error sourced from encoding issues

func NewEncodingFailuref

func NewEncodingFailuref(msg string, err error) *EncodingFailure

NewEncodingFailuref formats and returns a new EncodingFailure

func (*EncodingFailure) Error

func (e *EncodingFailure) Error() string

func (*EncodingFailure) FailureCode

func (e *EncodingFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (EncodingFailure) Unwrap

func (e EncodingFailure) Unwrap() error

Unwrap unwraps the error

type EncodingUnsupportedValueError

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

EncodingUnsupportedValueError indicates that Cadence attempted to encode a value that is not supported.

func NewEncodingUnsupportedValueError

func NewEncodingUnsupportedValueError(value interpreter.Value, path []string) *EncodingUnsupportedValueError

NewEncodingUnsupportedValueError construct a new EncodingUnsupportedValueError

func (*EncodingUnsupportedValueError) Code

Code returns the error code for this error

func (*EncodingUnsupportedValueError) Error

type Error

type Error interface {
	// Code returns the code for this error
	Code() ErrorCode
	// and anything else that is needed to be an error
	error
}

Error covers all non-fatal errors happing while validating and executing a transaction or an script.

type ErrorCode

type ErrorCode uint16
const (
	// tx validation errors 1000 - 1049
	// ErrCodeTxValidationError         ErrorCode = 1000 - reserved
	ErrCodeInvalidTxByteSizeError     ErrorCode = 1001
	ErrCodeInvalidReferenceBlockError ErrorCode = 1002
	// Deprecated: ErrCodeExpiredTransactionError
	ErrCodeExpiredTransactionError       ErrorCode = 1003
	ErrCodeInvalidScriptError            ErrorCode = 1004
	ErrCodeInvalidGasLimitError          ErrorCode = 1005
	ErrCodeInvalidProposalSignatureError ErrorCode = 1006
	ErrCodeInvalidProposalSeqNumberError ErrorCode = 1007
	ErrCodeInvalidPayloadSignatureError  ErrorCode = 1008
	ErrCodeInvalidEnvelopeSignatureError ErrorCode = 1009

	// base errors 1050 - 1100
	ErrCodeFVMInternalError            ErrorCode = 1050
	ErrCodeValueError                  ErrorCode = 1051
	ErrCodeInvalidArgumentError        ErrorCode = 1052
	ErrCodeInvalidAddressError         ErrorCode = 1053
	ErrCodeInvalidLocationError        ErrorCode = 1054
	ErrCodeAccountAuthorizationError   ErrorCode = 1055
	ErrCodeOperationAuthorizationError ErrorCode = 1056
	ErrCodeOperationNotSupportedError  ErrorCode = 1057

	// execution errors 1100 - 1200
	// ErrCodeExecutionError                 ErrorCode = 1100 - reserved
	ErrCodeCadenceRunTimeError      ErrorCode = 1101
	ErrCodeEncodingUnsupportedValue ErrorCode = 1102
	ErrCodeStorageCapacityExceeded  ErrorCode = 1103
	//  Deprecated: ErrCodeGasLimitExceededError
	ErrCodeGasLimitExceededError              ErrorCode = 1104
	ErrCodeEventLimitExceededError            ErrorCode = 1105
	ErrCodeLedgerIntractionLimitExceededError ErrorCode = 1106
	ErrCodeStateKeySizeLimitError             ErrorCode = 1107
	ErrCodeStateValueSizeLimitError           ErrorCode = 1108
	ErrCodeTransactionFeeDeductionFailedError ErrorCode = 1109

	// accounts errors 1200 - 1250
	// ErrCodeAccountError              ErrorCode = 1200 - reserved
	ErrCodeAccountNotFoundError          ErrorCode = 1201
	ErrCodeAccountPublicKeyNotFoundError ErrorCode = 1202
	ErrCodeAccountAlreadyExistsError     ErrorCode = 1203
	ErrCodeFrozenAccountError            ErrorCode = 1204

	// contract errors 1250 - 1300
	// ErrCodeContractError          ErrorCode = 1250 - reserved
	ErrCodeContractNotFoundError      ErrorCode = 1251
	ErrCodeContractNamesNotFoundError ErrorCode = 1252
)

func (ErrorCode) String

func (ec ErrorCode) String() string

type EventLimitExceededError

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

EventLimitExceededError indicates that the transaction has produced events with size more than limit.

func NewEventLimitExceededError

func NewEventLimitExceededError(totalByteSize, limit uint64) *EventLimitExceededError

NewEventLimitExceededError constructs a EventLimitExceededError

func (EventLimitExceededError) Code

Code returns the error code for this error

func (EventLimitExceededError) Error

func (e EventLimitExceededError) Error() string

type ExecutionError

type ExecutionError interface {
	Error
}

ExecutionError captures errors when executing a transaction/script. A transaction having this error has already passed validation and is included in a collection. the transaction will be executed by execution nodes but the result is reverted and in some cases there will be a penalty (or fees) for the payer, access nodes or collection nodes.

type ExpiredTransactionError

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

ExpiredTransactionError indicates that a transaction has expired. this error is the result of failure in any of the following conditions: - ReferenceBlock.Height - CurrentBlock.Height < Expiry Limit (Transaction is Expired)

func NewExpiredTransactionError

func NewExpiredTransactionError(refHeight, finalHeight uint64) *ExpiredTransactionError

NewExpiredTransactionError constructs a new ExpiredTransactionError

func (ExpiredTransactionError) Code

Code returns the error code for this error type

func (ExpiredTransactionError) Error

func (e ExpiredTransactionError) Error() string

type FVMInternalError

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

FVMInternalError indicates that an internal error occurs during tx execution.

func NewFVMInternalErrorf

func NewFVMInternalErrorf(msg string, args ...interface{}) *FVMInternalError

NewFVMInternalErrorf constructs a new FVMInternalError

func (*FVMInternalError) Code

func (e *FVMInternalError) Code() ErrorCode

Code returns the error code for this error type

func (*FVMInternalError) Error

func (e *FVMInternalError) Error() string

type Failure

type Failure interface {
	// FailureCode returns the failure code for this error
	FailureCode() FailureCode
	// and anything else that is needed to be an error
	error
}

Failure captures fatal unexpected virtual machine errors, we capture this type of error instead of panicing to collect all necessary data before crashing if any of these errors occurs we should halt the execution.

type FailureCode

type FailureCode uint16
const (
	FailureCodeUnknownFailure         FailureCode = 2000
	FailureCodeEncodingFailure        FailureCode = 2001
	FailureCodeLedgerFailure          FailureCode = 2002
	FailureCodeStateMergeFailure      FailureCode = 2003
	FailureCodeBlockFinderFailure     FailureCode = 2004
	FailureCodeHasherFailure          FailureCode = 2005
	FailureCodeMetaTransactionFailure FailureCode = 2100
)

func (FailureCode) String

func (fc FailureCode) String() string

type FrozenAccountError

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

FrozenAccountError is returned when a frozen account signs a transaction

func (FrozenAccountError) Address

func (e FrozenAccountError) Address() flow.Address

Address returns the address of frozen account

func (FrozenAccountError) Code

func (e FrozenAccountError) Code() ErrorCode

Code returns the error code for this error type

func (FrozenAccountError) Error

func (e FrozenAccountError) Error() string

type HasherFailure

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

HasherFailure captures a fatal caused by hasher

func NewHasherFailuref

func NewHasherFailuref(msg string, args ...interface{}) *HasherFailure

NewHasherFailuref constructs a new hasherFailure

func (HasherFailure) Error

func (e HasherFailure) Error() string

func (HasherFailure) FailureCode

func (e HasherFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (HasherFailure) Unwrap

func (e HasherFailure) Unwrap() error

Unwrap unwraps the error

type InvalidAddressError

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

InvalidAddressError indicates that a transaction references an invalid flow Address in either the Authorizers or Payer field.

func NewInvalidAddressErrorf

func NewInvalidAddressErrorf(address flow.Address, msg string, args ...interface{}) *InvalidAddressError

NewInvalidAddressErrorf constructs a new InvalidAddressError

func (InvalidAddressError) Address added in v0.16.0

func (e InvalidAddressError) Address() flow.Address

Address returns the invalid address

func (InvalidAddressError) Code

func (e InvalidAddressError) Code() ErrorCode

Code returns the error code for this error type

func (InvalidAddressError) Error

func (e InvalidAddressError) Error() string

func (InvalidAddressError) Unwrap

func (e InvalidAddressError) Unwrap() error

Unwrap unwraps the error

type InvalidArgumentError

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

InvalidArgumentError indicates that a transaction includes invalid arguments. this error is the result of failure in any of the following conditions: - number of arguments doesn't match the template TODO add more cases like argument size

func NewInvalidArgumentErrorf

func NewInvalidArgumentErrorf(msg string, args ...interface{}) *InvalidArgumentError

NewInvalidArgumentErrorf constructs a new InvalidArgumentError

func (InvalidArgumentError) Code

Code returns the error code for this error type

func (InvalidArgumentError) Error

func (e InvalidArgumentError) Error() string

func (InvalidArgumentError) Unwrap

func (e InvalidArgumentError) Unwrap() error

Unwrap unwraps the error

type InvalidEnvelopeSignatureError

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

InvalidEnvelopeSignatureError indicates that signature verification for a envelope key in this transaction has failed. this error is the result of failure in any of the following conditions: - provided hashing method is not supported - signature size is wrong - signature verification failed - public key doesn't match the one in the signature

func NewInvalidEnvelopeSignatureError

func NewInvalidEnvelopeSignatureError(address flow.Address, keyIndex uint64, err error) *InvalidEnvelopeSignatureError

NewInvalidEnvelopeSignatureError constructs a new InvalidEnvelopeSignatureError

func (InvalidEnvelopeSignatureError) Code

Code returns the error code for this error type

func (InvalidEnvelopeSignatureError) Error

func (InvalidEnvelopeSignatureError) Unwrap

Unwrap unwraps the error

type InvalidGasLimitError

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

InvalidGasLimitError indicates that a transaction specifies a gas limit that exceeds the maximum allowed by the network.

func NewInvalidGasLimitError

func NewInvalidGasLimitError(actual, maximum uint64) *InvalidGasLimitError

NewInvalidGasLimitError constructs a new InvalidGasLimitError

func (InvalidGasLimitError) Code

Code returns the error code for this error type

func (InvalidGasLimitError) Error

func (e InvalidGasLimitError) Error() string

type InvalidLocationError

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

InvalidLocationError indicates an invalid location is passed

func NewInvalidLocationErrorf

func NewInvalidLocationErrorf(location runtime.Location, msg string, args ...interface{}) *InvalidLocationError

NewInvalidLocationErrorf constructs a new InvalidLocationError

func (InvalidLocationError) Code

Code returns the error code for this error

func (InvalidLocationError) Error

func (e InvalidLocationError) Error() string

func (InvalidLocationError) Unwrap

func (e InvalidLocationError) Unwrap() error

Unwrap unwraps the error

type InvalidPayloadSignatureError

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

InvalidPayloadSignatureError indicates that signature verification for a key in this transaction has failed. this error is the result of failure in any of the following conditions: - provided hashing method is not supported - signature size is wrong - signature verification failed - public key doesn't match the one in the signature

func NewInvalidPayloadSignatureError

func NewInvalidPayloadSignatureError(address flow.Address, keyIndex uint64, err error) *InvalidPayloadSignatureError

NewInvalidPayloadSignatureError constructs a new InvalidPayloadSignatureError

func (InvalidPayloadSignatureError) Code

Code returns the error code for this error type

func (InvalidPayloadSignatureError) Error

func (InvalidPayloadSignatureError) Unwrap

Unwrap unwraps the error

type InvalidProposalSeqNumberError

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

InvalidProposalSeqNumberError indicates that proposal key sequence number does not match the on-chain value.

func NewInvalidProposalSeqNumberError

func NewInvalidProposalSeqNumberError(address flow.Address, keyIndex uint64, currentSeqNumber uint64, providedSeqNumber uint64) *InvalidProposalSeqNumberError

NewInvalidProposalSeqNumberError constructs a new InvalidProposalSeqNumberError

func (InvalidProposalSeqNumberError) Code

Code returns the error code for this error type

func (InvalidProposalSeqNumberError) CurrentSeqNumber

func (e InvalidProposalSeqNumberError) CurrentSeqNumber() uint64

CurrentSeqNumber returns the current sequence number

func (InvalidProposalSeqNumberError) Error

func (InvalidProposalSeqNumberError) ProvidedSeqNumber added in v0.16.0

func (e InvalidProposalSeqNumberError) ProvidedSeqNumber() uint64

ProvidedSeqNumber returns the provided sequence number

type InvalidProposalSignatureError

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

InvalidProposalSignatureError indicates that no valid signature is provided for the proposal key.

func NewInvalidProposalSignatureError

func NewInvalidProposalSignatureError(address flow.Address, keyIndex uint64, err error) *InvalidProposalSignatureError

NewInvalidProposalSignatureError constructs a new InvalidProposalSignatureError

func (InvalidProposalSignatureError) Code

Code returns the error code for this error type

func (InvalidProposalSignatureError) Error

func (InvalidProposalSignatureError) Unwrap

Unwrap unwraps the error

type InvalidReferenceBlockError

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

InvalidReferenceBlockError indicates that the transaction's ReferenceBlockID is not acceptable. this error is the result of failure in any of the following conditions: - ReferenceBlockID refer to a non-existing block - ReferenceBlockID == ZeroID (if configured by the network)

func NewInvalidReferenceBlockError

func NewInvalidReferenceBlockError(referenceBlockID string) *InvalidReferenceBlockError

NewInvalidReferenceBlockError constructs a new InvalidReferenceBlockError

func (InvalidReferenceBlockError) Code

Code returns the error code for this error type

func (InvalidReferenceBlockError) Error

type InvalidScriptError

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

InvalidScriptError indicates that a transaction contains an invalid Cadence script. this error is the result of failure in any of the following conditions: - script is empty - script can not be parsed by the cadence parser - comment-only script, len(program.Declarations) == 0

func NewInvalidScriptError

func NewInvalidScriptError(err error) *InvalidScriptError

NewInvalidScriptError constructs a new InvalidScriptError

func (InvalidScriptError) Code

func (e InvalidScriptError) Code() ErrorCode

Code returns the error code for this error type

func (InvalidScriptError) Error

func (e InvalidScriptError) Error() string

func (InvalidScriptError) Unwrap

func (e InvalidScriptError) Unwrap() error

Unwrap unwraps the error

type InvalidTxByteSizeError

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

InvalidTxByteSizeError indicates that a transaction byte size exceeds the maximum limit. this error is the result of failure in any of the following conditions: - the total tx byte size is bigger than the limit set by the network

func NewInvalidTxByteSizeError

func NewInvalidTxByteSizeError(txByteSize, maximum uint64) *InvalidTxByteSizeError

NewInvalidTxByteSizeError constructs a new InvalidTxByteSizeError

func (InvalidTxByteSizeError) Code

Code returns the error code for this error type

func (InvalidTxByteSizeError) Error

func (e InvalidTxByteSizeError) Error() string

type LedgerFailure

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

LedgerFailure captures a fatal error cause by ledger failures

func NewLedgerFailure

func NewLedgerFailure(err error) *LedgerFailure

NewLedgerFailure constructs a new LedgerFailure

func (*LedgerFailure) Error

func (e *LedgerFailure) Error() string

func (*LedgerFailure) FailureCode

func (e *LedgerFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (LedgerFailure) Unwrap

func (e LedgerFailure) Unwrap() error

Unwrap unwraps the error

type LedgerIntractionLimitExceededError

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

LedgerIntractionLimitExceededError is returned when a tx hits the maximum ledger interaction limit

func NewLedgerIntractionLimitExceededError

func NewLedgerIntractionLimitExceededError(used, limit uint64) *LedgerIntractionLimitExceededError

NewLedgerIntractionLimitExceededError constructs a LedgerIntractionLimitExceededError

func (*LedgerIntractionLimitExceededError) Code

Code returns the error code for this error

func (*LedgerIntractionLimitExceededError) Error

type MetaTransactionFailure added in v0.16.1

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

MetaTransactionFailure captures a fatal caused by invoking a meta transaction

func NewMetaTransactionFailuref added in v0.16.1

func NewMetaTransactionFailuref(msg string, args ...interface{}) *MetaTransactionFailure

NewMetaTransactionFailuref constructs a new hasherFailure

func (MetaTransactionFailure) Error added in v0.16.1

func (e MetaTransactionFailure) Error() string

func (MetaTransactionFailure) FailureCode added in v0.16.1

func (e MetaTransactionFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (MetaTransactionFailure) Unwrap added in v0.16.1

func (e MetaTransactionFailure) Unwrap() error

Unwrap unwraps the error

type OperationAuthorizationError

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

OperationAuthorizationError indicates not enough authorization to perform an operations like account creation or smart contract deployment.

func NewOperationAuthorizationErrorf

func NewOperationAuthorizationErrorf(operation string, msg string, args ...interface{}) *OperationAuthorizationError

NewOperationAuthorizationErrorf constructs a new OperationAuthorizationError

func (OperationAuthorizationError) Code

Code returns the error code for this error type

func (OperationAuthorizationError) Error

func (OperationAuthorizationError) Unwrap

Unwrap unwraps the error

type OperationNotSupportedError

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

OperationNotSupportedError is generated when an operation (e.g. getting block info) is not supported in the current environment.

func NewOperationNotSupportedError

func NewOperationNotSupportedError(operation string) *OperationNotSupportedError

NewOperationNotSupportedError construct a new OperationNotSupportedError

func (*OperationNotSupportedError) Code

Code returns the error code for this error

func (*OperationNotSupportedError) Error

type StateKeySizeLimitError

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

A StateKeySizeLimitError indicates that the provided key has exceeded the size limit allowed by the storage

func NewStateKeySizeLimitError

func NewStateKeySizeLimitError(owner, controller, key string, size, limit uint64) *StateKeySizeLimitError

NewStateKeySizeLimitError constructs a StateKeySizeLimitError

func (StateKeySizeLimitError) Code

Code returns the error code for this error

func (StateKeySizeLimitError) Error

func (e StateKeySizeLimitError) Error() string

type StateMergeFailure

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

StateMergeFailure captures a fatal caused by state merge

func NewStateMergeFailure

func NewStateMergeFailure(err error) *StateMergeFailure

NewStateMergeFailure constructs a new StateMergeFailure

func (StateMergeFailure) Error

func (e StateMergeFailure) Error() string

func (StateMergeFailure) FailureCode

func (e StateMergeFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (StateMergeFailure) Unwrap

func (e StateMergeFailure) Unwrap() error

Unwrap unwraps the error

type StateValueSizeLimitError

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

A StateValueSizeLimitError indicates that the provided value has exceeded the size limit allowed by the storage

func NewStateValueSizeLimitError

func NewStateValueSizeLimitError(value flow.RegisterValue, size, limit uint64) *StateValueSizeLimitError

NewStateValueSizeLimitError constructs a StateValueSizeLimitError

func (StateValueSizeLimitError) Code

Code returns the error code for this error

func (StateValueSizeLimitError) Error

func (e StateValueSizeLimitError) Error() string

type StorageCapacityExceededError

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

An StorageCapacityExceededError indicates that an account used more storage than it has storage capacity.

func NewStorageCapacityExceededError

func NewStorageCapacityExceededError(address flow.Address, storageUsed, storageCapacity uint64) *StorageCapacityExceededError

NewStorageCapacityExceededError constructs a new StorageCapacityExceededError

func (StorageCapacityExceededError) Code

Code returns the error code for this error

func (StorageCapacityExceededError) Error

type TransactionFeeDeductionFailedError added in v0.17.1

type TransactionFeeDeductionFailedError struct {
	Payer  flow.Address
	TxFees uint64
	// contains filtered or unexported fields
}

An TransactionFeeDeductionFailedError indicates that a there was an error deducting transaction fees from the transaction Payer

func NewTransactionFeeDeductionFailedError added in v0.17.1

func NewTransactionFeeDeductionFailedError(payer flow.Address, txFees uint64, err error) *TransactionFeeDeductionFailedError

NewTransactionFeeDeductionFailedError constructs a new TransactionFeeDeductionFailedError

func (TransactionFeeDeductionFailedError) Code added in v0.17.1

Code returns the error code for this error

func (TransactionFeeDeductionFailedError) Error added in v0.17.1

func (TransactionFeeDeductionFailedError) Unwrap added in v0.17.1

Unwrap returns the wrapped err

type UnknownFailure

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

UnknownFailure captures an unknown vm fatal error

func NewUnknownFailure

func NewUnknownFailure(err error) *UnknownFailure

NewUnknownFailure constructs a new UnknownFailure

func (*UnknownFailure) Error

func (e *UnknownFailure) Error() string

func (*UnknownFailure) FailureCode

func (e *UnknownFailure) FailureCode() FailureCode

FailureCode returns the failure code

func (UnknownFailure) Unwrap

func (e UnknownFailure) Unwrap() error

Unwrap unwraps the error

type ValueError

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

ValueError indicates a value is not valid value.

func NewValueErrorf

func NewValueErrorf(valueStr string, msg string, args ...interface{}) *ValueError

NewValueErrorf constructs a new ValueError

func (ValueError) Code

func (e ValueError) Code() ErrorCode

Code returns the error code for this error type

func (ValueError) Error

func (e ValueError) Error() string

func (ValueError) Unwrap

func (e ValueError) Unwrap() error

Unwrap unwraps the error

Jump to

Keyboard shortcuts

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