[][src]Enum holochain_wasmer_common::result::WasmError

pub enum WasmError {
    Unspecified,
    ArgumentDeserializationFailed,
    OutOfMemory,
    ReceivedWrongActionResult,
    CallbackFailed,
    RecursiveCallForbidden,
    ResponseSerializationFailed,
    NotAnAllocation,
    ZeroSizedAllocation,
    UnknownEntryType,
    MismatchWasmCallDataType,
    EntryNotFound,
    WorkflowFailed,
    PointerMap,
    Utf8,
    Json,
    Memory,
    GuestResultHandling(String),
    Zome(String),
}

Enum of all possible ERROR codes that a Zome API Function could return.

Variants

Unspecified
ArgumentDeserializationFailed
OutOfMemory
ReceivedWrongActionResult
CallbackFailed
RecursiveCallForbidden
ResponseSerializationFailed
NotAnAllocation
ZeroSizedAllocation
UnknownEntryType
MismatchWasmCallDataType
EntryNotFound
WorkflowFailed
PointerMap

while converting pointers and lengths between u64 and i64 across the host/guest we hit either a negative number (cannot fit in u64) or very large number (cannot fit in i64) negative pointers and lengths are almost certainly indicative of a critical bug somewhere max i64 represents about 9.2 exabytes so should keep us going long enough to patch wasmer if commercial hardware ever threatens to overstep this limit

Utf8

while shuffling raw bytes back and forward between Vec and utf-8 str values we have hit an invalid utf-8 string. in normal operations this is always a critical bug as the same rust internals are responsible for bytes and utf-8 in both directions. it is also possible that someone tries to throw invalid utf-8 at us to be evil.

Json

similar to Utf8 we have somehow hit a struct that isn't round-tripping through JsonString correctly, which should be impossible for a well-behaved JsonStringAble thingie

Memory

something went wrong while writing or reading bytes to/from wasm memory this means something like "reading 16 bytes did not produce 2x u64 ints" or maybe even "failed to write a byte to some pre-allocated wasm memory" whatever this is it is very bad and probably not recoverable

GuestResultHandling(String)

failed to take bytes out of the guest and do something with it the most common reason is a bad deserialization the string is whatever error message comes back from the interal process (e.g. a JsonError)

Zome(String)

something to do with zome logic that we don't know about

Trait Implementations

impl Clone for WasmError[src]

impl Debug for WasmError[src]

impl<'de> Deserialize<'de> for WasmError[src]

impl Eq for WasmError[src]

impl<'a> From<&'a WasmError> for JsonString[src]

impl From<Error> for WasmError[src]

impl From<JsonError> for WasmError[src]

impl From<TryFromIntError> for WasmError[src]

impl From<TryFromSliceError> for WasmError[src]

impl From<Utf8Error> for WasmError[src]

impl From<WasmError> for JsonString[src]

impl Hash for WasmError[src]

impl Ord for WasmError[src]

impl PartialEq<WasmError> for WasmError[src]

impl PartialOrd<WasmError> for WasmError[src]

impl Serialize for WasmError[src]

impl StructuralEq for WasmError[src]

impl StructuralPartialEq for WasmError[src]

impl<'a> TryFrom<&'a JsonString> for WasmError[src]

type Error = JsonError

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for WasmError[src]

type Error = JsonError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.