Enum cretonne_wasm::WasmError [−][src]
pub enum WasmError { InvalidWebAssembly { message: &'static str, offset: usize, }, Unsupported(&'static str), ImplLimitExceeded, }
A WebAssembly translation error.
When a WebAssembly function can't be translated, one of these error codes will be returned to describe the failure.
Variants
InvalidWebAssembly
The input WebAssembly code is invalid.
This error code is used by a WebAssembly translator when it encounters invalid WebAssembly code. This should never happen for validated WebAssembly code.
Fields of InvalidWebAssembly
message: &'static str | A string describing the validation error. |
offset: usize | The bytecode offset where the error occurred. |
Unsupported(&'static str)
A feature used by the WebAssembly code is not supported by the embedding environment.
Embedding environments may have their own limitations and feature restrictions.
ImplLimitExceeded
An implementation limit was exceeded.
Cretonne can compile very large and complicated functions, but the implementation has limits that cause compilation to fail when they are exceeded.
Methods
impl WasmError
[src]
impl WasmError
pub fn from_binary_reader_error(e: BinaryReaderError) -> Self
[src]
pub fn from_binary_reader_error(e: BinaryReaderError) -> Self
Convert from a BinaryReaderError
to a WasmError
.
Trait Implementations
impl Fail for WasmError
[src]
impl Fail for WasmError
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self>
[src]
fn compat(self) -> Compat<Self>
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
fn causes(&self) -> Causes
[src]
fn causes(&self) -> Causes
Returns a iterator over the causes of this Fail
with itself as the first item and the root_cause
as the final item. Read more
fn root_cause(&self) -> &(Fail + 'static)
[src]
fn root_cause(&self) -> &(Fail + 'static)
Returns the "root cause" of this Fail
- the last value in the cause chain which does not return an underlying cause
. Read more
impl Display for WasmError
[src]
impl Display for WasmError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Debug for WasmError
[src]
impl Debug for WasmError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for WasmError
[src]
impl PartialEq for WasmError
fn eq(&self, other: &WasmError) -> bool
[src]
fn eq(&self, other: &WasmError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &WasmError) -> bool
[src]
fn ne(&self, other: &WasmError) -> bool
This method tests for !=
.
impl Eq for WasmError
[src]
impl Eq for WasmError