wasmer_object/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use object::write::Error as ObjectWriteError;
use thiserror::Error;

/// The Object error can occur when creating an object file
/// from a `Compilation`.
#[derive(Error, Debug)]
pub enum ObjectError {
    /// The object was provided a not-supported binary format
    #[error("Binary format {0} not supported")]
    UnsupportedBinaryFormat(String),
    /// The object was provided a not-supported architecture
    #[error("Architecture {0} not supported")]
    UnsupportedArchitecture(String),
    /// The object was provided an unknown endianness
    #[error("Unknown Endianness")]
    UnknownEndianness,
    /// The object was provided a not-supported architecture
    #[error("Error when writing the object: {0}")]
    Write(#[from] ObjectWriteError),
    /// The module provided could not be serialized into bytes
    #[error("Error when serializing the given module: {0}")]
    Serialize(#[from] wasmer_types::SerializeError),
}