| 10 | |
| 11 | #[derive(Error, Debug)] |
| 12 | pub enum RuntimeError { |
| 13 | #[error("Error invoking function {0}")] |
| 14 | CallFunctionError(String), |
| 15 | |
| 16 | #[error("Error executing {0}")] |
| 17 | ExecutionError(String), |
| 18 | |
| 19 | #[error("Error exporting function {0}")] |
| 20 | ExportFunctionError(String), |
| 21 | |
| 22 | #[error("Invalid parameter type {0}")] |
| 23 | InvalidParamType(String), |
| 24 | |
| 25 | #[error("Wasmtime error {0}")] |
| 26 | WasmtimeError(String), |
| 27 | } |
| 28 | |
| 29 | /// Utility result type to be used throughout |
| 30 | pub type Result<T> = std::result::Result<T, RuntimeError>; |