wasmer_compiler/object/
error.rs

1use object::write::Error as ObjectWriteError;
2use thiserror::Error;
3
4/// The Object error can occur when creating an object file
5/// from a `Compilation`.
6#[derive(Error, Debug)]
7pub enum ObjectError {
8    /// The object was provided a not-supported binary format
9    #[error("Binary format {0} not supported")]
10    UnsupportedBinaryFormat(String),
11    /// The object was provided a not-supported architecture
12    #[error("Architecture {0} not supported")]
13    UnsupportedArchitecture(String),
14    /// The object was provided an unknown endianness
15    #[error("Unknown Endianness")]
16    UnknownEndianness,
17    /// The object was provided a not-supported architecture
18    #[error("Error when writing the object: {0}")]
19    Write(#[from] ObjectWriteError),
20    /// The module provided could not be serialized into bytes
21    #[error("Error when serializing the given module: {0}")]
22    Serialize(#[from] wasmer_types::SerializeError),
23}