#[non_exhaustive]pub enum ExecError {
Show 55 variants
Interpreter(String),
Storage(Error),
BytesRepr(Error),
NamedKeyNotFound(String),
KeyNotFound(Key),
AccountNotFound(Key),
TypeMismatch(StoredValueTypeMismatch),
InvalidAccess {
required: AccessRights,
},
ForgedReference(URef),
FunctionNotFound(String),
ParityWasm(Error),
WasmOptimizer,
GasLimit,
Ret(Vec<URef>),
Resolver(ResolverError),
Revert(ApiError),
AddKeyFailure(AddKeyFailure),
RemoveKeyFailure(RemoveKeyFailure),
UpdateKeyFailure(UpdateKeyFailure),
SetThresholdFailure(SetThresholdFailure),
SystemContract(Error),
DeploymentAuthorizationFailure,
ExpectedReturnValue,
InvalidContext,
IncompatibleProtocolMajorVersion {
expected: u32,
actual: u32,
},
CLValue(CLValueError),
UnsupportedWasmStart,
NoActiveEntityVersions(PackageHash),
InvalidEntityVersion(EntityVersionKey),
DisabledEntityVersion(EntityVersionKey),
MissingEntityVersion(EntityVersionKey),
NoSuchMethod(String),
TemplateMethod(String),
WasmPreprocessing(PreprocessingError),
UnexpectedStoredValueVariant,
LockedEntity(PackageHash),
InvalidEntity(AddressableEntityHash),
InvalidByteCode(ByteCodeHash),
MissingArgument {
name: String,
},
DictionaryItemKeyExceedsLength,
MissingSystemContractHash(String),
RuntimeStackOverflow,
MissingRuntimeStack,
DisabledEntity(AddressableEntityHash),
Transform(TransformError),
UnexpectedKeyVariant(Key),
DisabledUnrestrictedTransfers,
TrackingCopy(TrackingCopyError),
UpgradeAuthorizationFailure,
InvalidEntryPointType,
InvalidImputedOperation,
InvalidUtf8Encoding(Utf8Error),
IncompatibleRuntime(ContractRuntimeTag),
NoMatchingEntityVersionKey,
AmbiguousEntityVersion,
}
Expand description
Possible execution errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Interpreter(String)
WASM interpreter error.
Storage(Error)
Storage error.
BytesRepr(Error)
Failed to (de)serialize bytes.
NamedKeyNotFound(String)
Unable to find named key.
KeyNotFound(Key)
Unable to find a key.
AccountNotFound(Key)
Unable to find an account.
TypeMismatch(StoredValueTypeMismatch)
Type mismatch error.
InvalidAccess
Invalid access.
Fields
required: AccessRights
Required access rights of the operation.
ForgedReference(URef)
Forged reference error.
FunctionNotFound(String)
Unable to find a function.
ParityWasm(Error)
Parity WASM error.
WasmOptimizer
Error optimizing WASM.
GasLimit
Execution exceeded the gas limit.
Ret(Vec<URef>)
A stored smart contract called a ret function.
Resolver(ResolverError)
Error using WASM host function resolver.
Revert(ApiError)
Reverts execution with a provided status
AddKeyFailure(AddKeyFailure)
Error adding an associated key.
RemoveKeyFailure(RemoveKeyFailure)
Error removing an associated key.
UpdateKeyFailure(UpdateKeyFailure)
Error updating an associated key.
SetThresholdFailure(SetThresholdFailure)
Error setting threshold on associated key.
SystemContract(Error)
Error executing system contract.
DeploymentAuthorizationFailure
Weight of all used associated keys does not meet account’s deploy threshold.
ExpectedReturnValue
Host buffer expected a value to be present.
InvalidContext
Error calling a host function in a wrong context.
IncompatibleProtocolMajorVersion
Unable to execute a deploy with invalid major protocol version.
CLValue(CLValueError)
Error converting a CLValue.
UnsupportedWasmStart
WASM bytes contains an unsupported “start” section.
NoActiveEntityVersions(PackageHash)
Contract package has no active contract versions.
InvalidEntityVersion(EntityVersionKey)
Invalid entity version supplied.
DisabledEntityVersion(EntityVersionKey)
Invalid entity version supplied.
MissingEntityVersion(EntityVersionKey)
Invalid entity version supplied.
NoSuchMethod(String)
Contract does not have specified entry point.
TemplateMethod(String)
Contract does
WasmPreprocessing(PreprocessingError)
Error processing WASM bytes.
UnexpectedStoredValueVariant
Unexpected variant of a stored value.
LockedEntity(PackageHash)
Error upgrading a locked contract package.
InvalidEntity(AddressableEntityHash)
Unable to find a contract by a specified hash address.
InvalidByteCode(ByteCodeHash)
Unable to find the WASM bytes specified by a hash address.
MissingArgument
Error calling a smart contract with a missing argument.
DictionaryItemKeyExceedsLength
Error writing a dictionary item key which exceeded maximum allowed length.
MissingSystemContractHash(String)
Missing system contract hash.
RuntimeStackOverflow
An attempt to push to the runtime stack which is already at the maximum height.
MissingRuntimeStack
The runtime stack is None
.
DisabledEntity(AddressableEntityHash)
Contract is disabled.
Transform(TransformError)
Transform error.
UnexpectedKeyVariant(Key)
Invalid key
DisabledUnrestrictedTransfers
Failed to transfer tokens on a private chain.
TrackingCopy(TrackingCopyError)
Storage error.
UpgradeAuthorizationFailure
Weight of all used associated keys does not meet entity’s upgrade threshold.
InvalidEntryPointType
The EntryPoints contains an invalid entry.
InvalidImputedOperation
Invalid operation.
InvalidUtf8Encoding(Utf8Error)
Invalid string encoding.
IncompatibleRuntime(ContractRuntimeTag)
Incompatible transaction runtime.
NoMatchingEntityVersionKey
No matching entity version key.
AmbiguousEntityVersion
Ambiguous entity version and unable to determine entity version key.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<AddKeyFailure> for Error
impl From<AddKeyFailure> for Error
Source§fn from(err: AddKeyFailure) -> Self
fn from(err: AddKeyFailure) -> Self
Source§impl From<CLValueError> for Error
impl From<CLValueError> for Error
Source§fn from(e: CLValueError) -> Self
fn from(e: CLValueError) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(_optimizer_error: OptimizerError) -> Self
fn from(_optimizer_error: OptimizerError) -> Self
Source§impl From<PreprocessingError> for Error
impl From<PreprocessingError> for Error
Source§fn from(error: PreprocessingError) -> Self
fn from(error: PreprocessingError) -> Self
Source§impl From<RemoveKeyFailure> for Error
impl From<RemoveKeyFailure> for Error
Source§fn from(err: RemoveKeyFailure) -> Self
fn from(err: RemoveKeyFailure) -> Self
Source§impl From<ResolverError> for Error
impl From<ResolverError> for Error
Source§fn from(err: ResolverError) -> Self
fn from(err: ResolverError) -> Self
Source§impl From<RuntimeStackOverflow> for Error
impl From<RuntimeStackOverflow> for Error
Source§fn from(_: RuntimeStackOverflow) -> Self
fn from(_: RuntimeStackOverflow) -> Self
Source§impl From<SetThresholdFailure> for Error
impl From<SetThresholdFailure> for Error
Source§fn from(err: SetThresholdFailure) -> Self
fn from(err: SetThresholdFailure) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(e: TrackingCopyError) -> Self
fn from(e: TrackingCopyError) -> Self
Source§impl From<UpdateKeyFailure> for Error
impl From<UpdateKeyFailure> for Error
Source§fn from(err: UpdateKeyFailure) -> Self
fn from(err: UpdateKeyFailure) -> Self
impl HostError for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more