Documentation ¶
Index ¶
- func As(err error, target interface{}) bool
- func HandleRuntimeError(err error) error
- func Is(err error, target error) bool
- func IsALedgerFailure(err error) bool
- func IsAccountAccountPublicKeyNotFoundError(err error) bool
- func IsAccountNotFoundError(err error) bool
- func IsCadenceRuntimeError(err error) bool
- func NewAccountAlreadyExistsError(address flow.Address) error
- func NewAccountNotFoundError(address flow.Address) error
- func NewContractNamesNotFoundError(address flow.Address) error
- func NewContractNotFoundError(address flow.Address, contract string) error
- func NewFrozenAccountError(address flow.Address) error
- func SplitErrorTypes(inp error) (err Error, failure Failure)
- type AccountAlreadyExistsError
- type AccountAuthorizationError
- type AccountNotFoundError
- type AccountPublicKeyNotFoundError
- type BlockFinderFailure
- type CadenceRuntimeError
- type ContractNamesNotFoundError
- type ContractNotFoundError
- type EncodingFailure
- type EncodingUnsupportedValueError
- type Error
- type ErrorCode
- type EventLimitExceededError
- type ExecutionError
- type ExpiredTransactionError
- type FVMInternalError
- type Failure
- type FailureCode
- type FrozenAccountError
- type HasherFailure
- type InvalidAddressError
- type InvalidArgumentError
- type InvalidEnvelopeSignatureError
- type InvalidGasLimitError
- type InvalidLocationError
- type InvalidPayloadSignatureError
- type InvalidProposalSeqNumberError
- type InvalidProposalSignatureError
- type InvalidReferenceBlockError
- type InvalidScriptError
- type InvalidTxByteSizeError
- type LedgerFailure
- type LedgerIntractionLimitExceededError
- type MetaTransactionFailure
- type OperationAuthorizationError
- type OperationNotSupportedError
- type StateKeySizeLimitError
- type StateMergeFailure
- type StateValueSizeLimitError
- type StorageCapacityExceededError
- type TransactionFeeDeductionFailedError
- type UnknownFailure
- type ValueError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
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 ¶
HandleRuntimeError handles runtime errors and separates errors generated by runtime from fvm errors (e.g. environment errors)
func Is ¶
Is is a utility function to call std error lib `Is` function for instance equality checks.
func IsALedgerFailure ¶ added in v0.21.0
IsALedgerFailure returns true if the error or any of the wrapped errors is a ledger failure
func IsAccountAccountPublicKeyNotFoundError ¶
IsAccountAccountPublicKeyNotFoundError returns true if error has this type
func IsAccountNotFoundError ¶
IsAccountNotFoundError returns true if error has this type
func IsCadenceRuntimeError ¶
IsCadenceRuntimeError returns true if error has this type
func NewAccountAlreadyExistsError ¶
NewAccountAlreadyExistsError constructs a new AccountAlreadyExistsError
func NewAccountNotFoundError ¶
NewAccountNotFoundError constructs a new AccountNotFoundError
func NewContractNamesNotFoundError ¶
NewContractNamesNotFoundError constructs a new ContractNamesNotFoundError
func NewContractNotFoundError ¶
NewContractNotFoundError constructs a new ContractNotFoundError
func NewFrozenAccountError ¶
NewFrozenAccountError constructs a new FrozenAccountError
func SplitErrorTypes ¶
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 ¶
func (e AccountAlreadyExistsError) Code() ErrorCode
Code returns the error code for this error type
func (AccountAlreadyExistsError) Error ¶
func (e AccountAlreadyExistsError) Error() string
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
func (e AccountAuthorizationError) Address() flow.Address
Address returns the address of an account without enough authorization
func (AccountAuthorizationError) Code ¶
func (e AccountAuthorizationError) Code() ErrorCode
Code returns the error code for this error type
func (AccountAuthorizationError) Error ¶
func (e AccountAuthorizationError) Error() string
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 ¶
func (e AccountNotFoundError) Code() ErrorCode
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 ¶
func (e AccountPublicKeyNotFoundError) Code() ErrorCode
Code returns the error code for this error type
func (AccountPublicKeyNotFoundError) Error ¶
func (e AccountPublicKeyNotFoundError) Error() string
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 ¶
func (e *ContractNamesNotFoundError) Code() ErrorCode
Code returns the error code for this error type
func (*ContractNamesNotFoundError) Error ¶
func (e *ContractNamesNotFoundError) Error() string
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
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 ¶
func (e *EncodingUnsupportedValueError) Code() ErrorCode
Code returns the error code for this error
func (*EncodingUnsupportedValueError) Error ¶
func (e *EncodingUnsupportedValueError) Error() string
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 )
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 ¶
func (e EventLimitExceededError) Code() ErrorCode
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 ¶
func (e ExpiredTransactionError) Code() ErrorCode
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
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 ¶
func (e InvalidArgumentError) Code() ErrorCode
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 ¶
func (e InvalidEnvelopeSignatureError) Code() ErrorCode
Code returns the error code for this error type
func (InvalidEnvelopeSignatureError) Error ¶
func (e InvalidEnvelopeSignatureError) Error() string
func (InvalidEnvelopeSignatureError) Unwrap ¶
func (e InvalidEnvelopeSignatureError) Unwrap() error
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 ¶
func (e InvalidGasLimitError) Code() ErrorCode
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 ¶
func (e InvalidLocationError) Code() ErrorCode
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 ¶
func (e InvalidPayloadSignatureError) Code() ErrorCode
Code returns the error code for this error type
func (InvalidPayloadSignatureError) Error ¶
func (e InvalidPayloadSignatureError) Error() string
func (InvalidPayloadSignatureError) Unwrap ¶
func (e InvalidPayloadSignatureError) Unwrap() error
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 ¶
func (e InvalidProposalSeqNumberError) Code() ErrorCode
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 (e InvalidProposalSeqNumberError) Error() string
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 ¶
func (e InvalidProposalSignatureError) Code() ErrorCode
Code returns the error code for this error type
func (InvalidProposalSignatureError) Error ¶
func (e InvalidProposalSignatureError) Error() string
func (InvalidProposalSignatureError) Unwrap ¶
func (e InvalidProposalSignatureError) Unwrap() error
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 ¶
func (e InvalidReferenceBlockError) Code() ErrorCode
Code returns the error code for this error type
func (InvalidReferenceBlockError) Error ¶
func (e InvalidReferenceBlockError) Error() string
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 ¶
func (e InvalidTxByteSizeError) Code() ErrorCode
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
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 ¶
func (e *LedgerIntractionLimitExceededError) Code() ErrorCode
Code returns the error code for this error
func (*LedgerIntractionLimitExceededError) Error ¶
func (e *LedgerIntractionLimitExceededError) Error() string
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 ¶
func (e OperationAuthorizationError) Code() ErrorCode
Code returns the error code for this error type
func (OperationAuthorizationError) Error ¶
func (e OperationAuthorizationError) Error() string
func (OperationAuthorizationError) Unwrap ¶
func (e OperationAuthorizationError) Unwrap() error
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 ¶
func (e *OperationNotSupportedError) Code() ErrorCode
Code returns the error code for this error
func (*OperationNotSupportedError) Error ¶
func (e *OperationNotSupportedError) Error() string
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 ¶
func (e StateKeySizeLimitError) Code() ErrorCode
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 ¶
func (e StateValueSizeLimitError) Code() ErrorCode
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 ¶
func (e StorageCapacityExceededError) Code() ErrorCode
Code returns the error code for this error
func (StorageCapacityExceededError) Error ¶
func (e StorageCapacityExceededError) Error() string
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
func (e TransactionFeeDeductionFailedError) Code() ErrorCode
Code returns the error code for this error
func (TransactionFeeDeductionFailedError) Error ¶ added in v0.17.1
func (e TransactionFeeDeductionFailedError) Error() string
func (TransactionFeeDeductionFailedError) Unwrap ¶ added in v0.17.1
func (e TransactionFeeDeductionFailedError) Unwrap() error
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
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