Skip to main content

waffle/
errors.rs

1//! Error types.
2
3/// An error that occurs when translating Wasm to IR.
4#[derive(Clone, Debug)]
5pub enum FrontendError {
6    /// The given WebAssembly feature is not supported.
7    UnsupportedFeature(String),
8    /// Some dimension of the WebAssembly module is too large to be
9    /// supported by this library.
10    TooLarge(String),
11    /// An internal error occurred.
12    Internal(String),
13}
14
15impl std::fmt::Display for FrontendError {
16    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
17        std::fmt::Debug::fmt(self, f)
18    }
19}
20
21impl std::error::Error for FrontendError {}