1#[derive(Debug, thiserror::Error)]
2pub enum Error {
3 #[error("WASM parsing error: {0}")]
4 WasmParse(#[from] wasmparser::BinaryReaderError),
5
6 #[error("Unsupported WASM feature: {0}")]
7 Unsupported(String),
8
9 #[error("Float operations are not supported by PVM")]
10 FloatNotSupported,
11
12 #[error("No exported function found")]
13 NoExportedFunction,
14
15 #[error("Function index {0} not found")]
16 FunctionNotFound(u32),
17
18 #[error("Unresolved import: {0}")]
19 UnresolvedImport(String),
20
21 #[error("Internal error: {0}")]
22 Internal(String),
23}
24
25pub type Result<T> = std::result::Result<T, Error>;